I want to know why I cant use .append to do this exercise. My code works when I use the result = result + words[item], but I get the error code below when I try to use the result.append(words[item]). Aren't the two lines doing basically the same thing? How can I use .append in this context.
AttributeError: 'str' object has no attribute 'append'
n = ["Michael", "Lieberman"] # Add your function here def join_strings(words): result = "" for item in range(len(words)): result.append(words[item]) # result = result + words[item] return result print join_strings(n)