Implementing and Operating Cisco Enterprise Network Core Technologies (ENCOR) — Question 51
Which statements are used for error handling in Python?
Answer options
- A. try/catch
- B. catch/release
- C. block/rescue
- D. try/except
Correct answer: D
Explanation
The correct answer is D, 'try/except', as these are the specific keywords used in Python for catching and handling exceptions. Option A, 'try/catch', is incorrect because 'catch' is not used in Python; option B, 'catch/release', is not related to error handling in Python; and option C, 'block/rescue', is terminology used in other programming languages, not Python.