This question already has an answer here:
- Reverse a string in Python 7 answers
I am new to programming. I am trying to write a code to print the reverse of any given string. I have written the following code:
import math
string= raw_input ("Enter string")
n= len(string)
ol= n-1
for ol>-1,ol--:
print string[ol]
but i am getting syntax error. Please help me to figure this out.
for ol>-1,ol--
, that's not python syntax. – Ashwini Chaudhary Aug 30 '13 at 6:58