title: Use of deprecated module md5
body: <p>I am using the following code in python:</p>
  
  <pre><code>from hashlib import md5
  user_code = string.upper( md5.new(user_str).hexdigest() )
  </code></pre>
  
  <p>and the warning is</p>
  
  <p>DeprecationWarning: the md5 module is deprecated; use hashlib instead</p>
  
  <p>Could you please help how to update this code so that is runs also on the current version of python?</p>
  
  <p>Thanks!</p>