πŸ“Š Python
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

πŸ‘οΈ
112
Total Visits
πŸ“½οΈ
8 mo ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
89%
Success Rate