What is wrong


#1



https://www.codecademy.com/en/courses/python-beginner-nzzVa/3/5?curriculum_id=4f89dab3d788890003000096#


Oops, try again. join_strings(['x', 'y', 'z', 'a']) returned None, did you remember to return the result?


n = ["Michael", "Lieberman"]
def join_strings(words):
    result = ""
    for item in range(len(words)):
        result = words.append(item)
    return result
    
print join_strings(n)

output = None
             None


#2

Strings aren't really lists so you don't need to use append. You can simply just use + to concatenate strings.


#3

i agree with datfatcat, except i would say the following:

.append() is method for appending to a list, it doesn't work for strings.


#4

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

print join_strings(n)

it shows :-LiebermanLieberman
None

error :- Oops, try again. join_strings(['x', 'y', 'z', 'a']) returned 'aa' instead of 'xyza'


#5

i got it

this is correct

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

print join_strings(n)


#6