🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Python Loops: all 13 questions

Quiz: Python Loops · Question 8 of 13

What is list(range(5, 0, -2))?

What is list(range(5, 0, -2))?

  1. A.[5, 3, 1]
  2. B.[5, 3, 1, -1]
  3. C.[1, 3, 5]
  4. D.[]
Answer & explanation

Correct answer: [5, 3, 1]

Counting down by 2, stopping before 0.

Can you get the rest right without peeking?

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

Start the quiz →