16./using Strings in list in functions. Return Error
My code continually says:
File "python", line 8
SyntaxError: 'return' outside function
I expected it to go through the whole program but no matter what I do that error keeps popping up and I even looked at past examples and help forums and nothing has seemed to work.
What am I doing wrong?
Replace this line with your code. n = ["Michael", "Lieberman"] # Add your function here def join_strings(words): result = [""] for i in range(len(words)): result += words[i] return result print join_strings(n)