F Reverse of a String using Python program | CodeTheta

Reverse of a String using Python program

June 22, 2018

Pre defined value
Code :
String = "www.codetheta.com"
print(''.join(reversed(String)))

Output :
moc.atehtedoc.www

Program execution time string value given.
Code :
String = input("Enter any string: ")
print(''.join(reversed(String)))

Output :
Enter any string: www.codetheta.com
moc.atehtedoc.www

IDE Used To Test This Code : Python IDLE.

Try this code in your computer for better understanding. Enjoy the code. If you have any Question you can contact us or mail us.We will reply you as soon as possible.

Post a Comment