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

Quiz: Scope and Closures · Question 10 of 10

What is the value of middle after a, middle, z = "python"?

What is the value of middle after a, *middle, z = "python"?

  1. A."ytho"
  2. B.('y', 't', 'h', 'o')
  3. C.['y', 't', 'h', 'o']
  4. D.An error
Answer & explanation

Correct answer: ['y', 't', 'h', 'o']

Extended unpacking always collects the leftover items into a list.

Can you get the rest right without peeking?

Take the timed Quiz: Scope and Closures quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →