Please guys, I can't find the error.
It was supposed to invert any string defined as input. I testes on Python 3 on my computer and it worked properly.

word = ""
palavra = []
def reverse(text):
    for indice in range(len(text)):
        word = text[-(indice+1)]
        outro = ''.join(palavra)
    return outro



word = ""
palavra = []

inside the function, right below the definition. They are global variables right now and will retain any word that the function appends (and not refresh for very call).


How did you do thaaaat?!! Thank you so much!!


Error messages say a lot about bugs. Especially python errors. I saw that in my tests, the result had the previous one in it and realized it's because word and palavra were outside.