nerdexam
Python_Institute

PCAP-31-03 · Question #121

What is the expected behavior of the following code?

The correct answer is B. it outputs 'tuple' object does not support item assignment. See the full explanation below for the reasoning.

Question

What is the expected behavior of the following code?

Options

  • Athe code is erroneous and it will not execute
  • Bit outputs 'tuple' object does not support item assignment
  • C0it outputs list assignment index out of range
  • Dit outputs None

How the community answered

(25 responses)
  • A
    4% (1)
  • B
    84% (21)
  • C
    4% (1)
  • D
    8% (2)

Community Discussion

No community discussion yet for this question.

Full PCAP-31-03 Practice