how to make global variables python code example
Example 1: global variable python
a = 0
def testFor():
global a
if(a == 0):
#run code
Example 2: how to declare global variable in python
global n
n = 'whatever'
a = 0
def testFor():
global a
if(a == 0):
#run code
global n
n = 'whatever'