title: Python 2,3 Convert Integer to "bytes" Cleanly
body: <p>The shortest ways I have found are:</p>
  
  <pre><code>n = 5
  
  # Python 2.
  s = str(n)
  i = int(s)
  
  # Python 3.
  s = bytes(str(n), "ascii")
  i = int(s)
  </code></pre>
  
  <p>I am particularly concerned with two factors: readability and portability.  The second method, for Python 3, is ugly.  However, I think it may be backwards compatible.</p>
  
  <p>Is there a shorter, cleaner way that I have missed?  I currently make a lambda expression to fix it with a new function, but maybe that's unnecessary.</p>