Substitute multiple whitespace with single whitespace in Python
<p>I have this string:</p>

<pre><code>mystring = 'Here is  some   text   I      wrote   '
</code></pre>

<p>How can I substituate the double, triple (...) whitespaces to just one whitespace so that I get:</p>

<pre><code>mystring = 'Here is some text I wrote'
</code></pre>

<p>Thanks.</p>
