Trying to use a function to change a from 0 to 1, but this outputs 0:
a = 0
def function():
a = 1
function()
print (a)
Trying to use a function to change a from 0 to 1, but this outputs 0:
a = 0
def function():
a = 1
function()
print (a)