is this code wrong?

def reverse(text):
    while n<len(text):
    return text


It works for the first letters, but not for the whole word.

Let's take the word "Car" for example.

In the first iteration the letter C will be replaced with r. Now the word is "rar".
In the second iteration a will be replaced with a, the word is still "rar".
In the third iteration the first letter will replace the last letter.
But the first letter was already replaced with the last letter, so the last letter will stay what it was. In the example "rar" will still be "rar".