[OT] Bit twiddling homework

Steven D'Aprano steve+comp.lang.python at pearwood.info
Fri Jul 20 02:37:11 EDT 2018


On Fri, 20 Jul 2018 08:25:04 +0200, Brian Oney via Python-list wrote:

> PS: Can I twiddle bits in Python?

Yes.

These operators work on ints:

  bitwise AND:  &
  bitwise OR:   |
  bitwise XOR:  ^



-- 
Steven D'Aprano
"Ever since I learned about confirmation bias, I've been seeing
it everywhere." -- Jon Ronson




More information about the Python-list mailing list