Basic Programs

If Else Programs

While loop Programs

For loop Programs

List Programs


Python program to Accept the Word from User and Reverse It


This examples shows, how to reverse a word from given string using for loop.

Example:
Example.py
word= input("Enter the string : ")
rev = ""
for i in word:
    rev = i + rev  
print(rev)

Output

Enter the string : RamKumar
ramuKmaR

Prev Next