Python Lists and Functions


This is my code,

n = ["Michael", "Lieberman"]

Add your function here

def join_strings(words):
result = ""
for x in words:
return result

print join_strings(n)

The error it returns is,

Traceback (most recent call last):
File "python", line 9, in
File "python", line 6, in join_strings
AttributeError: 'str' object has no attribute 'append'

I'm guessing I'm trying to append incorrectly, how would I do that?


your result is empty string, if you want to append you need empty list
result = [ ]


Thanks! :evergreen_tree: