[Answer]-How to return only few values of a list rather than returning all the values

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).

Leave a comment