Python: how to use slicing with lists?

Example:

numbers = [0, 1, 2, 3, 4, 5]
Slicing allows accessing parts of sequences like lists.

Solution:

first_three = numbers[:3]

Beginner's Guide to Python