📜  作用域如何在 python 代码示例中工作

📅  最后修改于: 2022-03-11 14:47:07.946000             🧑  作者: Mango

代码示例1
a = 5
b = 3

def f1():
  a = 2
  print(a)
  print(b)
  
print(a)   # Will print 5
f1()       # Will print 2 and 3