nerdexam
Python_Institute

PCAP-31-03 · Question #87

If you want to access an exception object's components and store them in an object called e, you have to use the following form of exception statement

The correct answer is C. except Exception as e. See the full explanation below for the reasoning.

Question

If you want to access an exception object's components and store them in an object called e, you have to use the following form of exception statement

Options

  • Aexcept Exception(e):
  • Bexcept e=Exception:
  • Cexcept Exception as e:
  • Dsuch an action is not possible in Python

How the community answered

(57 responses)
  • A
    5% (3)
  • B
    9% (5)
  • C
    84% (48)
  • D
    2% (1)

Community Discussion

No community discussion yet for this question.

Full PCAP-31-03 Practice