I am trying to change number inside of function with change_value but as you can see it doesn't work
def change_value(number):
number += 1
def function():
number = 0
change_value(number)
print(number)
function()
When I run it, it prints out 0 instead of 1
numberin yourchange_valuefunction is a different variable than the one in yourfunctionfunction.return numberinchange_valueand then you can donumber = change_value(number). This way everyone can see that you change value in variablenumber.