Thursday, March 19, 2015

interesting def


Interesting  ~

>>> i =5
>>>
>>> def f(arg=i):
print(arg)

>>> i =7
>>> f()

guess what number??

the result is 5


No comments:

Post a Comment