Friday, February 5, 2021

PYTHON PROGRAM TO REVERSE A STRING


   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

IIT-Madras invites applications second batch of online data science programme, JEE scores not needed

IIT-Madras invites applications second batch of online data science programme, JEE scores not needed As a part of the application process, ...