Question: Why does "123"[::-1] result in "321"?
MY thinking is [::-1] is same as [0:3:-1], that the empty places defaults to start and end index of the string object. So, if we start from 0 index and decrement index by 1 till we reach 3, how many index we should get? I think we should get infinite infinite number of indices (0,-1,-2,-3.). This is my confusion. I hope my question is clear. Thanks, Vikas _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor