7. reverse


word = raw_input("Your word:")
container = list(str(word))
rev_container = []
def reverse(word):
    iters = len(container)
    n = iters -1
    for i in container:
        return i
drow = ''.join(rev_container)
print drow


everything you need to reverse the string, should be inside the function


Thank you, I could correct the code!


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.