def main():
print(reverseString("Hello"))
def reverseString(string):
newString=""
for i in range(len(string)-1,-1):
newString+=string[i]
print newString
main()
I tried running this code but nothing is printed and I don't know what the problem is.
print( string[::-1] )