Doubt in appending string


#1



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


why does result.append(a) doesnt work?It works with lists and string is similar as list


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

print join_strings(n)


#2

@systemmaster20563,
Have a read
== discussions / opinions ==
http://stackoverflow.com/questions/36849466/python-string-vs-list-odd-behaviour


#3

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