nerdexam
Cisco

350-401 · Question #83

Which statements are used for error handling in Python?

The correct answer is B. try/except. Python Error Handling Explanation Python uses try/except blocks to handle errors and exceptions, making option B correct. When code in the try block raises an error, execution jumps to the except block, allowing you to handle the error gracefully rather than crashing the program.

Submitted by anna_se· Mar 6, 2026Automation

Question

Which statements are used for error handling in Python?

Options

  • Atry/catch
  • Btry/except
  • Cblock/rescue
  • Dcatch/release

How the community answered

(31 responses)
  • A
    3% (1)
  • B
    87% (27)
  • C
    3% (1)
  • D
    6% (2)

Explanation

Python Error Handling Explanation

Python uses try/except blocks to handle errors and exceptions, making option B correct. When code in the try block raises an error, execution jumps to the except block, allowing you to handle the error gracefully rather than crashing the program.

Options A (try/catch) and D (catch/release) are incorrect because Python does not use the keyword catch - that syntax belongs to languages like Java, JavaScript, and C++. Option C (block/rescue) is entirely invalid Python syntax; rescue is actually used in Ruby, not Python.

Memory Tip: Think "Python is EXCEPTional" - Python uses except instead of catch. If you see catch in an answer about Python error handling, eliminate it immediately!

Topics

#Python#Error Handling#Exception Handling

Community Discussion

No community discussion yet for this question.

Full 350-401 Practice