Bitwise Operations

Ulrich Eckhardt ulrich.eckhardt at
Tue Jul 30 08:20:06 CEST 2013

Am 30.07.2013 01:34, schrieb Devyn Collier Johnson:
> Typing "101 & 010" or "x = (int(101, 2) & int(010, 2))" only gives errors.

What errors? Check out Eric Raymond's essay on asking smart questions, 
it's a real eye-opener! ;)

That said, use "0b" as prefix for binary number literals (0b1000 is 
eight, for example).



More information about the Python-list mailing list