• It says to me my code doesn't work, but.....

 

Hello everyone! I was doing task, on my opinion solving the problem is right, but it output error to me. The task is 'Backward Each Word', my code cant pass 'hello world'. This is my code: def backwardstringbyword(string): if len(string.split()) < 2: return string[::-1] else: reversedstring = ' ' for i in string.split(): reversedstring += i[::-1] + ' ' return reversedstring[1:len(reversed_string) - 1] Whats the problem? Thank you in advance!

.