I'm trying to write a function that switches a variable from True to False, or vice versa. I don't want 2 functions, one for true to false, and one for false to true, I just want one function that toggles a variable between True and False.
var = True
def func(x):
#CODE
print var #SHOULD PRINT FALSE
any ideas?