title: How to hash a variable in Python?
body: <p>This example works fine <a href="https://docs.python.org/3.3/library/hashlib.html" rel="noreferrer">example</a>:</p>
  
  <pre><code>import hashlib
  m = hashlib.md5()
  m.update(b"Nobody inspects")
  r= m.digest()
  print(r)
  </code></pre>
  
  <p>Now, I want to do the same thing but with a variable: <code>var= "hash me this text, please"</code>. How could I do it following the same logic of the example ?</p>