[Tutor] silly question

Jason Child jasonchild at cnsp.com
Thu Dec 23 01:52:53 CET 2004


Ok, I guess my question (now) is:

how do I change global variables within a function:

##################################
VAR = "TEST"

def m():
    VAR="no test"
##################################

when I do this (from the interactive editor):

##################################
 >>>print VAR
TEST
 >>>m()
 >>>
 >>>print VAR
TEST
 >>>
##################################

any advice?


More information about the Tutor mailing list