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
Here is simply:
print "loremipsum"[-1::-1]
and some logically:
def str_reverse_fun(): empty_list = [] new_str = 'loremipsum' index = len(new_str) while index: index = index - 1 empty_list.append(new_str[index]) return ''.join(empty_list) print str_reverse_fun()
output:
muspimerol