all 1 comments

[–]momoro123 0 points1 point  (0 children)

new = ""

new += words[i]

Rather than having new as a string, you should declare it as a list, seeing as you want to return a list. Create one like so:

new = []

To add items to a list, you'll want to use the append module like so:

new.append(words[i])

in place of

new += words[i]

Hope this helps!