Super Stuck, is the website messing up?


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)


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


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


Then the could should work then


Thats weird
because it worked for me


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


did the result end up in correct?


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