There is no built in reverse function for Python\'s str object. What is the best way of implementing this method?
reverse
str
If supplying a very conci
A lesser perplexing way to look at it would be:
string = 'happy' print(string)
'happy'
string_reversed = string[-1::-1] print(string_reversed)
'yppah'
In English [-1::-1] reads as:
"Starting at -1, go all the way, taking steps of -1"