Basic Bits hacks in Python


This is a companion discussion topic for the original entry at http://iq.opengenus.org/bit-hacks-in-python/