nerdexam
Python_Institute

PCAP-31-03 · Question #100

If you need to serve two different exceptions called Ex1 and Ex2 in one except branch, you can write:

The correct answer is B. except (ex1, Ex2). See the full explanation below for the reasoning.

Question

If you need to serve two different exceptions called Ex1 and Ex2 in one except branch, you can write:

Options

  • Aexcept Ex1 Ex2:
  • Bexcept (ex1, Ex2):
  • Cexcept Ex1, Ex2:
  • Dexcept Ex1+Ex2:

How the community answered

(29 responses)
  • A
    14% (4)
  • B
    79% (23)
  • C
    3% (1)
  • D
    3% (1)

Community Discussion

No community discussion yet for this question.

Full PCAP-31-03 Practice