Q. What does the `finally` block do in exception handling?

  • (A) Executes if there’s no error
  • (B) Executes if there's an error
  • (C) Executes regardless of error
  • (D) Executes only on syntax error
πŸ’¬ Discuss
βœ… Correct Answer: (C) Executes regardless of error
Explanation: `finally` is always executed after `try` and `except` blocks, regardless of exception.
Explanation by: Mr. Dubey
`finally` is always executed after `try` and `except` blocks, regardless of exception.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
138
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
94%
Success Rate