Answers for "right a fxn that returns the string in reverese"

1

reverse string python recursion

def reverse(string):
    if len(string) == 0:
        return string
    else:
        return reverse(string[1:]) + string[0]
a = str(input("Enter the string to be reversed: "))
print(reverse(a))
Posted by: Guest on January-21-2020
6

how to reverse a string in python

'your sting'[::-1]
Posted by: Guest on July-16-2020

Code answers related to "right a fxn that returns the string in reverese"

Python Answers by Framework

Browse Popular Code Answers by Language