What keyword is used to catch exceptions in Python?

  • catch
  • except
  • throw
  • try

In Python, you use the "except" keyword to catch exceptions. Exceptions are used to handle errors and unexpected situations in your code. When an exception occurs, the code within the "except" block is executed.

Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *