Reverse string in python



def reverse(s):
str = ""
for i in s:
str = i + str
return str
s = "Amaresh Tiwari"

print ("The original string  is : ",end="") 
print (s) 
  
print ("The reversed string(using loops) is : ",end="") 
print (reverse(s))


Comments