What is the most efficient way to toggle between 0 and 1?
0
1
I use abs function, very useful on loops
x = 1 for y in range(0, 3): x = abs(x - 1)
x will be 0.