"питон безумно неочевидный..."

Jan 17, 2020 14:47

https://thesz.livejournal.com/1519481.html?thread=13432697#t13432697
"питон безумно неочевидный..."

>>> def f(x=[]):
... x.append(1)
... return x
...
>>> f()
[1]
>>> f()
[1, 1]
>>> f()
[1, 1, 1]
>>>
Previous post Next post
Up