nerdexam
Python_Institute

PCAP-31-03 · Question #149

Assuming that 1 - is a four-element list is there any difference between these two statements?

The correct answer is B. yes, there is, the first line deletes the list as a whole, the second line just empties the list. See the full explanation below for the reasoning.

Question

Assuming that 1 - is a four-element list is there any difference between these two statements?

Options

  • Ayes, there is, the first line empties the list, the second line deletes the list as a whole
  • Byes, there is, the first line deletes the list as a whole, the second line just empties the list
  • Cno, there is no difference
  • Dyes, there is, the first line deletes the list as a whole, the second line removes all the elements

How the community answered

(41 responses)
  • A
    2% (1)
  • B
    80% (33)
  • C
    10% (4)
  • D
    7% (3)

Community Discussion

No community discussion yet for this question.

Full PCAP-31-03 Practice