Reverse string in python on June 24, 2019 Get link Facebook X Pinterest Email Other Apps 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
Comments
Post a Comment