I\'m trying to add or subtract from a defined variable, but I can\'t figure out how to overwrite the old value with the new one.
a = 15 def test(): a =
You're modifying a variable a created in the scope of the function test(). If you want the outter a to be modified you could do:
a
test()
a = 15 def test(): global a a = a + 1 print(a) test()