🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: The collections Module: all 10 questions

Quiz: The collections Module · Question 6 of 10

Which is true about a namedtuple?

Which is true about a namedtuple?

  1. A.Its fields can be read by name or by index, and it cannot be changed
  2. B.Its fields can be changed with normal assignment
  3. C.It cannot be unpacked
  4. D.It is a kind of dictionary
Answer & explanation

Correct answer: Its fields can be read by name or by index, and it cannot be changed

It is a real tuple with added field names.

Can you get the rest right without peeking?

Take the timed Quiz: The collections Module quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →