"Oops, try again. join_strings(['x', 'y', 'z', 'a']) returned 'x' instead of 'xyza'


#1

HELP 16/18 Lists & Functions: My code below returns error "Oops, try again. join_strings(['x', 'y', 'z', 'a']) returned 'x' instead of 'xyza'

n = ["Michael", "Lieberman"]
def join_strings(words):
    result = ""
    for i in range(len(words)):
        result += words[i]
        return result

print join_strings(n)

TypeError: 'list' object is not callable
#2

Hi @tootiedwyer,

Hint: Your return statement should be outside the loop.