title: What is the most efficient way in Python to convert a string to all lowercase stripping out all non-ascii alpha characters?
body: <p>I have a simple task I need to perform in Python, which is to convert a string to all lowercase and strip out all non-ascii non-alpha characters. </p>
  
  <p>For example:</p>
  
  <pre><code>"This is a Test" -&gt; "thisisatest"
  "A235th@#$&amp;( er Ra{}|?&gt;ndom" -&gt; "atherrandom"
  </code></pre>
  
  <p>I have a simple function to do this:</p>
  
  <pre><code>import string
  import sys
  
  def strip_string_to_lowercase(s):
      tmpStr = s.lower().strip()
      retStrList = []
      for x in tmpStr:
          if x in string.ascii_lowercase:
              retStrList.append(x)
  
      return ''.join(retStrList)
  </code></pre>
  
  <p>But I cannot help thinking there is a more efficient, or more elegant, way.</p>
  
  <p>Thanks!</p>
  
  <hr>
  
  <p><strong>Edit:</strong></p>
  
  <p>Thanks to all those that answered. I learned, and in some cases re-learned, a good deal of python.</p>