In C I could, for example, zero out bit #10 in a 32 bit unsigned value like so:
unsigned long value = 0xdeadbeef; value &= ~(1<<10);
Have you tried copying and pasting your code into the Python REPL to see what will happen?
>>> value = 0xdeadbeef >>> value &= ~(1<<10) >>> hex (value) '0xdeadbaef'