• Guys pls help with it

Question related to mission Backward Each Word

 

My code in this task:

def backward_string_by_word(text: str) -> str:
    for i in text.split():
        text = text.replace(i, i[::-1])
    return text

But when checking my solution with "olleH Hello" script doesn't work and I don't know why. It show me correct answer "Right result:"Hello olleH"" and "My result:"olleH olleH"". Why script doesn't reverse first word olleH -> Hello? Explain pls