<p>Sometimes I break long conditions in <code>if</code>s onto several lines. The most obvious way to do this is:</p>

<pre><code>  if (cond1 == 'val1' and cond2 == 'val2' and
      cond3 == 'val3' and cond4 == 'val4'):
      do_something
</code></pre>

<p>Isn't very very appealing visually, because the action blends with the conditions. However, it is the natural way using correct Python indentation of 4 spaces.</p>

<p>For the moment I'm using:</p>

<pre><code>  if (    cond1 == 'val1' and cond2 == 'val2' and
          cond3 == 'val3' and cond4 == 'val4'):
      do_something
</code></pre>

<p>But this isn't very pretty. :-)</p>

<p>Can you recommend an alternative way?</p>

This doesn't improve so much but...
```
```
allCondsAreOK = (cond1 == 'val1' and cond2 == 'val2' and
                 cond3 == 'val3' and cond4 == 'val4')

if allCondsAreOK:
   do_something
```
```