7. reverse


#1



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


#2

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


#3

Thank you, I could correct the code!


#4

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