title: Python: Reversibly encode alphanumeric string to integer
body: <p>I want to convert a string (composed of alphanumeric characters) into an integer and then convert this integer back into a string:</p>
  
  <p><code>string --&gt; int --&gt; string</code></p>
  
  <p>In other words, I want to represent an alphanumeric string by an integer.</p>
  
  <p>I found a working solution, which I included in the answer, but I do not think it is the best solution, and I am interested in other ideas/methods.</p>
  
  <p>Please don't tag this as duplicate just because a lot of similar questions already exist, I specifically want an easy way of transforming a string into an integer and <strong>vice versa</strong>.</p>
  
  <p>This should work for strings that contain alphanumeric characters, i.e. strings containing numbers and letters.</p>