write a python function to reverse a string subroutine,sformbnine ,whose argument is a list if exactly two items ,[n,d] code example
Example 1: how to reverse a string in python
'your sting'[::-1]
Example 2: 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))