i see several problems, lets start with this line:
so you are going to append result to words? Not so sure about that. Then another problem, i guess you want to append words to result, right? But result is a string, and
append is used for list, to join something to a string use
+ instead. But what exactly is it you want to add to result?
i, since that is what looping over the words, so you can add them to the string one by one:
result = result + i
also, your loop currently runs once, i would put return at the same indent level as the for loop. This way, the for loop can run until finished, then a return keyword is reached, and the function ends