how to define a global variable for a value from a 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