Hello. I'm supposed to make a function that concatanates the strings inside a list and returns the result. I keep getting this erro msg:
Traceback (most recent call last):
File "python", line 9, in
File "python", line 4, in join_strings
UnboundLocalError: local variable 'result' referenced before assignment
I have no idea what I did wrong. Please help.
n = ["Michael", "Lieberman"] def join_strings(words): result == "" for wrd in words: result += wrd return result print join_strings(n)