Skip to main content

Program To Reverse String Using Python

· One min read
Kaustubh Kulkarni
file.py
# WAP accept string and return reverse
str1=str(input("Enter String : "))
print(str1[::-1])

Output

file.py
Enter String : Kaustubh
hbutsuaK