Super Stuck, is the website messing up?


#1



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


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


It looks as though the webpage is trying to run the wrong variable in my code?

I'm genuinely stuck here, it's returning the correct result but won't take it, am I doing something wrong?


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


print join_strings(n)


#2

Change the result = result + i into result += i


#3

It's the same result, still the business about xyza


#4

Then the could should work then


#5

Thats weird
because it worked for me


#6

Oh its the for i in n
it should be for i in words:


#7

did the result end up in correct?


#9

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