神奇的Python代码

1 def f(arg=i):
2    print(arg)
3 
4 i = 6
5 f()
6 i = 7
7 f(i)

输出结果是:

7
7

猜你喜欢

转载自www.cnblogs.com/heenhui2016/p/10623692.html