[Tutor] Negative step in Python slicing

Sahilpreet Singh s9814246136 at gmail.com
Fri Nov 12 07:26:12 EST 2021


Hi there,
I am unable to understand how the following works in Python:
mylist[::k]
Where mylist is any iterable and k is any constant value.
It would be very helpful if you can explain with some examples.


More information about the Tutor mailing list