When I use this code it works
def join_strings(words): result = "" for i in range(len(words)): result = result + words[i] return result
but when I use this code:
def join_strings(words): result = "" for words in n: result = result + words return result
Even though the output of the both code are same, it gives the following error.
Oops, try again. join_strings(['x', 'y', 'z', 'a']) returned 'MichaelLieberman' instead of 'xyza'
Why does the second code give error message? Please help.
Replace this line with your code.