← Quiz: Python Lists: all 15 questions
Quiz: Python Lists · Question 4 of 15
What is [10, 20, 30, 40][1:3]?
What is [10, 20, 30, 40][1:3]?
- A.[10, 20]
- B.[20, 30]
- C.[20, 30, 40]
- D.[30, 40]
Answer & explanation
Correct answer: [20, 30]
Indexes 1 and 2 → [20, 30].
Can you get the rest right without peeking?
Take the timed Quiz: Python Lists quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →