coding cp1251 def revers string index while type string type and index

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# -*- coding: cp1251 -*-
def revers(string):
index = 0
while type(string) == type("1") and index < len(string):
print string[len(string) - index]
index += 1
string = raw_input("Input string")
revers(string)