global variable not assigned, newbie question

Jean-Daniel Gamache jdgamache at
Mon Nov 1 15:51:54 CET 2004

Hi! here's a python newbie question ...
why is my variable (myNum) not assigned the value 10 ???


myNum = 0

def setNum():
    myNum = 10
    print myNum
def main():
    print myNum

if __name__ == '__main__':

More information about the Python-list mailing list