title: Python: efficient method to replace accents (é to e), remove [^a-zA-Z\d\s], and lower()
body: <p>Using Python 3.3. I want to do the following:</p>
  
  <ul>
  <li>replace special alphabetical characters such as e acute (é) and o
  circumflex (ô) with the base character (ô to o, for example)</li>
  <li>remove all characters except alphanumeric and spaces in between alphanumeric
  characters</li>
  <li>convert to lowercase</li>
  </ul>
  
  <p>This is what I have so far:</p>
  
  <pre><code>mystring_modified = mystring.replace('\u00E9', 'e').replace('\u00F4', 'o').lower()
  alphnumspace = re.compile(r"[^a-zA-Z\d\s]")
  mystring_modified = alphnumspace.sub('', mystring_modified)
  </code></pre>
  
  <p>How can I improve this? Efficiency is a big concern, especially since I am currently performing the operations inside a loop:</p>
  
  <pre><code># Pseudocode
  for mystring in myfile:
      mystring_modified = # operations described above
      mylist.append(mystring_modified)
  </code></pre>
  
  <p>The files in question are about 200,000 characters each.</p>