1trying to assign a global variable in a function will result in the function creating a new variable
2with that name even if theres a global one. ensure to declare a as global in the function before any
3assignment.
4
5a = 7
6def setA(value):
7 global a # declare a to be a global
8 a = value # this sets the global value of a