Write a Python program to reverse a string.
Answer:
def
string_reverse
(str1):
rev_str=
""
for i in str1:
rev_str=i+rev_str
return rev_str
str1=input(
"Enter a string to reverse: "
)
print("Reversed string is ",string_reverse(str1))