Is there a way to change a global variable in a function and when that function is done, the variable retains the value it was assigned inside the function?
I made a very simple program below to ask for help
da = 2
def sds():
da = 3
sds()
print(da)
When you run the code above, it prints 2, but is there a way to make it print 3 ? Since 3 is the variable assigned to it inside the function, I want it to reflect it outside too.