Robotics & Artificial Intelligence

Write a Python program to reverse a string.

Python String Manipulation

2 Likes

Answer

string1 = input("Enter a string: ")
rev = string1[::-1]
print("Reversed string is:", rev)

Output

Enter a string: education
Reversed string is: noitacude

Answered By

2 Likes


Related Questions