What is the output of the following code: def my_func(a=[]):
a.append(1)
print(a)

my_func()
my_func()
my_func()
Explanation
my_func has a default argument of type List. List is mutable data type in Python.

Слідкуй за CodeGalaxy

Мобільний додаток Beta

Get it on Google Play
Зворотній Зв’язок
Продовжуйте вивчати
тести з Python
Cosmo
Зареєструйся Зараз
або Підпишись на майбутні тести