Python · Lesson 4.2 · Pro

Slicing lists

Take the first few, the last few, or every other item of a list.

In this lesson

  1. Slices work like on strings
  2. First n and last n
  3. Steps
  4. A slice is a new list