Contact: aviboots(AT)netvision.net.il
39,855 questions
51,776 answers
573 users
def f_local(): s = "python" if 's' in locals(): print ('s local variable exists') else: print ('s local variable does not exist') f_local() ''' run: s local variable exists '''
s = "python" if 's' in globals(): print ("s globals variable exist") else: print ("s globals variable does not exist") ''' run: s globals variable exist '''