setting python global variable code example
Example 1: global variable python
a = 0
def testFor():
global a
if(a == 0):
#run code
Example 2: global variables python
global x
x=1
a = 0
def testFor():
global a
if(a == 0):
#run code
global x
x=1