File: class/Workbook/Examples/Lecture5/global1.py

y, z = 1, 2         # global variables in module

def all_global():
    global x        # declare globals assigned
    x = y + z       # no need to declare y,z: 3-scope rule 



[Home page] Books Code Blog Python Author Train Find ©M.Lutz