Process with() statement after if() condition in one line
<p>This line doesn't make much sense, but I wonder why it raises a syntax error:</p>

<p><code>x = 1; if x: with open("x.txt") as f: f.write(x)</code></p>

<p>How can I execute <code>with</code> block after <code>if</code> statement in one line?</p>
