title: How do I find the position of the least significant bit in which 2 numbers differ in python?
body: <p>I have two binary numbers </p>
  
  <pre><code>01110
  </code></pre>
  
  <p>and </p>
  
  <pre><code>10010
  </code></pre>
  
  <p>It is easy to see that the first position they differ is the third from the right. How do I find this in python? Let's say, I would hve something like <code>sdb(a, b)</code> and that would return 3 in this case. Are there better options than looping over the 2 number's bit from the right using leftshift?</p>