16/18 Using String Lists in Functions


hey i have already figured out what is the right way to write this code:
"result += words[i]" instead of "result.append(words[i])"

but, why can't i write it this way:

n = ["Michael", "Lieberman"]

Add your function here

def join_strings(words):
result = ""
for i in range(len(words)):
return result

print join_strings(n)


.append() is a method that belongs to lists. You can't use it on strings.


understood! thankyou