logo

Crowdly

Browser

Add to Chrome

What does this code write (§2.1)? def add(item, bag=[]): bag += [item] ...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

What does this code write (§2.1)?

def add(item, bag=[]):

bag += [item]

return bag

x = add(1)

y = add(2)

z = add(3, [])

print(x, y, z)

Wat skryf hierdie kode?

0%
0%
0%
0%
100%
More questions like this

Want instant access to all verified answers on stemlearn.sun.ac.za?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome