Skip to content

The basics · Lists

Comprehensions and slices

Build a new list in one line; cut a piece out of one. · 10 minutes

Predict first

nums = [10, 20, 30, 40, 50]. What is nums[1:3]?