Python reverse-stride slicing

Simply exclude the end range index…

>>> foo[3::-1]
'3210'

Ironically, about the only option I think you didn’t try.

Leave a Comment