title: Using Comparison Operators for Hex Values
body: <p>I want to create a function that performs a certain task only when a hex value indicates an upper or lower case letter, i.e., when the hex code is between 20 and 7A. Is there a way to make a statement in python that is logically equivalent to:</p>
  
  <pre><code>if a &gt;= 20 and a &lt;= 7A: perform stuff
  </code></pre>
  
  <p>? Do I just throw a 0x in front of it and magic happens? </p>