title: Python: How do I extract specific bits from a byte?
body: <p>I have a message which reads as <code>14 09 00 79 3d 00 23 27</code>. I can extract each byte from this message by calling <code>message[4]</code>, which will give me <code>3d</code> for example. How do I extract the individual 8 bits from this byte? For example, how would I get bits 24-27 as as single message? How about just bit 28?</p>