Which keyword is used to execute a block of code regardless of whether an exception was thrown?

  • try...except
  • finally
  • always
  • unless
The finally keyword is used to execute a block of code regardless of whether an exception was thrown. This is useful for cleanup operations.
Add your answer
Loading...

Leave a comment

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