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
Recursive method:
def reverse(s): return s[0] if len(s)==1 else s[len(s)-1] + reverse(s[0:len(s)-1])
example:
print(reverse("Hello!")) #!olleH