Hi! I tried to do this using the append function:
n = ["Michael", "Lieberman"] def join_strings(words): result="" for i in range(len(words)): result=result.append(words[i]) return result print join_strings(n)
got error: error: AttributeError: 'str' object has no attribute 'append'
And when I saw the solution I realized that append works on lists and not strings! I was stuck yesterday because the wording of the exercise confused me that I should use the append function! Just a reminder that append doesnt work with str, seems like. Also important to note is that if ur using the simpler method of for i in words: - you can use both result+=i and result+=words[i] but if ur using the more complicated range one you should always use result+=words[i]. Im just curious why it cant work without me pointing out that i is an index in words list? Some help?