title: Code to strip non-alpha characters from string in Python
body: <p>I want to write a code that will take out all Non-Alpha character from a string. Alpha Characters are a-z,A-Z,and 0-9. So this code will also remove spaces but not crash on an empty string.
  For example:</p>
  
  <pre><code>to_alphanum('Cats go meow')
  #it would return:
  'Catsgomeow'
  
  to_alphanum('')
  #it would return:
  ''
  </code></pre>
  
  <p>Is there a way to do this?</p>