def f(arg=i):
print(arg) i = 6
f()
i = 7
f(i)

输出结果是:

7
7
05-27 05:36