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
Зарегистрируйся сейчас
или Подпишись на будущие тесты