top | item 8558429

Shortest way to reverse a string in programming languages

2 points| aligajani | 11 years ago | reply

My vote goes to Python: [::-1]

Can your's do better? Better here is "shorter"

6 comments

order
[+] JCJoverTCP|11 years ago|reply
if length of the string is 1, this may shorten some answers, no?
[+] aligajani|11 years ago|reply
Well, in Python the reversing is as short as a print
[+] kjs3|11 years ago|reply
Sure...same as if the cow is spherical.