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