PYTHON PROGRAM TO REVERSE A STRING
string=input("Please enter your own string:")
string2=" "
for i in string:
string2=i+string2
print("\n The Original string=", string)
print("The Reversed string=", string2)
OUTPUT:
*Please enter your own string:RAJU
The Original string= RAJU
The Reversed string= UJAR
No comments:
Post a Comment