declare it in a global statement : Global : Function PYTHON TUTORIALS


PYTHON TUTORIALS » Function » Global »

 

declare it in a global statement


X = 99 

def selector(  )
    global X  # Force X to be global (everywhere)
    print X 
    X = 88 

selector(  )



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo Function
» Global