title: Python: Replace "-" with whitespace
body: <p>I'm stuck on replacing "-" with whitespace in Python. I've searched Stack Overflow and tried the code below, but it doesn't do what I want. </p>
  
  <pre><code>import string
  
  text1 = ['why-wont-these-dashes-go-away']
  for i in text1:
   str(i).replace("-", " ")
  print "output 1: " 
  print text1
  
  text2 = ['why-wont-these-dashes-go-away']
  text2 = [x.strip('-') for x in text2]
  print "output 2: " 
  print text2
  
  text3 = ['why-wont-these-dashes-go-away']
  text3 = [''.join(c for c in s if c not in string.punctuation) for s in text3]
  print "output 3: " 
  print text3
  
  text4 = ['why-wont-these-dashes-go-away']
  text4 = [' '.join(c for c in s if c not in string.punctuation) for s in text3]
  print "output 4: " 
  print text4
  </code></pre>
  
  <p>Here's my output:</p>
  
  <pre><code>output 1: 
  ['why-wont-these-dashes-go-away']
  output 2: 
  ['why-wont-these-dashes-go-away']
  output 3: 
  ['whywontthesedashesgoaway']
  output 4: 
  ['w h y w o n t t h e s e d a s h e s g o a w a y']
  </code></pre>
  
  <p>Here's what I want:</p>
  
  <pre><code>['why wont there dashes go away']
  </code></pre>
  
  <p>I know text1, text2, and text3 are each lists with one item which is a string. It's probably something small I'm overlooking, any ideas?</p>