Replacing different characters in Python
<p>Suppose you have a string which you want to parse into a specific format. That means: replace <strong>all</strong> <code>' ', '.', '-', etc with '_'</code>.</p>

<p>I know that I could do this:</p>

<pre><code>&gt;s = "Hello----.....    World"
&gt;s = s.replace('-','_').replace('.', '_').replace(' ', '_')
&gt;print s
&gt;Hello_____________World
</code></pre>

<p>And get what I want. But, is there a cleaner way? A more <code>pythonic</code> way? 
I tried parsing a list in to the first argument of replace, but that didn't work very well.</p>