& is "bitwise and" operand in Python, you should use and instead
from wiki.python.org:
x & y : Does a "bitwise and". Each bit of the output is 1 if the corresponding bit of x AND of y is 1, otherwise it's 0.
"bitwise and" works like this:
>>> 1 & 0
0
>>> 0 & 0
0
>>> 1 & 1
1