⁉️ Interview question
What is the output of the following code?
Answer:
[1, 2]
#⃣ tags: #python #advanced #coding #programming #interview #defaultarguments #mutable #dev
By: t.iss.one/DataScienceQ 🚀
What is the output of the following code?
def func(a, b=[]):
b.append(a)
return b
print(func(1))
print(func(2))
Answer:
#⃣ tags: #python #advanced #coding #programming #interview #defaultarguments #mutable #dev
By: t.iss.one/DataScienceQ 🚀