The Classic Mutable Default Trap

def add_item(item, cart=[]):
    cart.append(item)
    return cart

print(add_item("apple"))
print(add_item("banana"))
What does the second print show?

A

['apple'] and ['banana'] printed as two independent lists

B

['apple', 'banana']

C

['banana']

D

[], followed by a TypeError on the second call