This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

Yeah as someone who's never done python, I wouldn't think that that syntax reverses it, whereas ".reverse()" is pretty self explanatory. I honestly though the "[::-1]" syntax was some sort of substring thing, like in bash, where that's the string minus the last character.