1👍
✅
You can use the slice operator: my_list[:3]
will return a list containg the first three values of my_list
.
(unless there are less than three values, in which case you get everything back).
Source:stackexchange.com