1. 程式人生 > >Python(56)_命名空間和作用域

Python(56)_命名空間和作用域

mage .com src col clas nbsp bubuko 命名 bsp

1 全局命名空間

a = 1
def fun():
    print(a)
fun()

技術分享圖片

Python(56)_命名空間和作用域