Q. Which of the following is the correct syntax for handling exceptions in Python?

  • (A) try: except: finally:
  • (B) try: catch: finally:
  • (C) catch: try: finally:
  • (D) try: error: finally:
πŸ’¬ Discuss
βœ… Correct Answer: (A) try: except: finally:
Explanation: The correct syntax for exception handling in Python is 'try: except: finally:'.
Explanation by: Ram Sharma
The correct syntax for exception handling in Python is 'try: except: finally:'.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
173
Total Visits
πŸ“½οΈ
2 y ago
Published
πŸŽ–οΈ
Ram Sharma
Publisher
πŸ“ˆ
83%
Success Rate