Home / Python Tips Generated By ChatGPT / Exception Handling with Try-Except in Python Catch exceptions to prevent crashes and handle errors gracefully. Source Code try: 1 / 0 except ZeroDivisionError: print("Cannot divide by zero!")