Using strings in lists in functions


#1


What am i doing wrong?


n = ["Michael", "Lieberman"]
# Add your function here
def join_strings(words):
    result = ""
    for word in words:
        result = result + result.append()
    return result    
print join_strings(n)


#2

Here, you're adding result to itself which is just an empty string. We are asked to add each word to result, not append() them. Reread instructions #3.


#4

n = ["Michael", "Lieberman"]

def join_strings(words):
result = ""
for word in words:
result = result + .append(n)
return result
print join_strings(n)

like this?


#5

See in the instructions where they didnt highlight append? They mean to just simply add :slight_smile: not append(). append means to "add something".


#6

ohhhhh lol got it now tnx


#7

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.