'One-lineize' python statement
<p>I'd like to know if one can write the following statement in one line:</p>

<pre><code>new = ''
for char in text:
    if char in blacklist:
        new += ' '
    else:
        new += char
</code></pre>

<p>I tried but I get syntax error:</p>

<pre><code>new = ''.join(c for c in text if c not in blacklist else ' ')
</code></pre>

<p>I know is not better or prettier, I just want to know if it's possible.</p>
