code>if lst:       # if lst is not empty
    ...
if not tup:   # if tup is empty
    ...</code></pre>


        <h3 id="checking-none">Checking <code>None</code></h3>


        <p>Use <code>is</code> and <code>is not</code> for <code>None</code>, not <code>==</code> and <code>!=</code>.
        </p>


        <h3 id="redundant-if-else">Redundant if/else</h3>


        <p>Don't do this:</p>

        <blockquote>
          <p>Bad</p>
        </blockquote>

        <pre><code>if pred:            # bad!
    ret