title: Python remove punctuation from a text file
body: <p>I'm trying to remove a list of punctuation from my text file but I have only one problem with words separated from hyphen. For example, if I have the word "post-trauma" I get "posttrama" conversely I want to get "post" "trauma".</p>
  
  <p>My code is:</p>
  
  <pre><code> punct=['!', '#', '"', '%', '$', '&amp;', ')', '(', '+', '*', '-'] 
  
   with open(myFile, "r") as f:
        text= f.read()
        remove = '|'.join(REMOVE_LIST) #list of word to remove
        regex = re.compile(r'('+remove+r')', flags=re.IGNORECASE) 
        out = regex.sub("", text)
  
        delta= " ".join(out.split())
        txt = "".join(c for c in delta if c not in punct )
  </code></pre>
  
  <p>Is there a way to solve it?</p>