Skip to content
RED SAGSkills
easy5 pts · first answer countspythondebugging

Python default list surprise

What does this Python code print?

def add_tag(tag, tags=[]):
    tags.append(tag)
    return tags

add_tag("a")
print(add_tag("b"))
Choose one answer