title: Access an element of a binary number in python
body: <p>Given such a binary number, I would like to access each element in the number.
  For example, I use the following code to access the 3rd element:</p>
  <pre><code>bin(125) # '0b1111101'
  bin(125)[::-1][3]
  </code></pre>
  <p>Yes, it works. But I am not sure whether this is a good way or not. It looks dangerous and I wonder if there are other better, more efficient, ways to access each element of binary numbers.</p>