title: Error while removing punctuations and numbers from text file
body: <p>I am trying to clean up a text file by removing punctuations, numbers and <br> etc.</p>
  <p>I wrote this code to try removing punctuations initially :</p>
  <pre><code>import string
  with open(&quot;uniquewords_list.txt&quot;) as f:
  
           L = sorted(word.strip(&quot;,&quot;) for line in f for word in line.split())
           
           out = L.translate(string.maketrans(&quot;&quot;,&quot;&quot;), string.punctuation)
  
           with open('testing.txt', 'w') as filehandle:
                for listitem in out:
                    filehandle.write('%s\n' % listitem)
  </code></pre>
  <p>However I am getting an error :</p>
  <pre><code>out = L.translate(string.maketrans(&quot;&quot;,&quot;&quot;), string.punctuation)
  AttributeError: 'list' object has no attribute 'translate'
  </code></pre>
  <p>I looked up the error description but still not able to fix it. Suggestions ?</p>
  <p><strong>Also, to delete numbers and characters like <br> what is an efficient way to do ?</strong></p>