Python taught me some good practices in regards to this. Python&#x27;s &quot;enforcement&quot; (or rather, strong PEP-8 suggestions) of 80 characters per line teaches you to come up with a lot of ways to avoid nesting.<p>The most useful one, and the one that drives me crazy when I see it, is when people write code like this:<p><pre><code>    if something:
      value = do something
    else:
      value = do something else

    return value
</code></pre>
These days I write code like this:<p><pre><code>    if something:
      return do something

    return do something else
</code></pre>
In the simple example, it&#x27;s not a big deal. But once you have 30 lines of code in between each statement (and nested if statements), it gets trickier to maintain every possible code path in your head.<p>This isn&#x27;t the same as &quot;show all conditions at once&quot; -- instead it&#x27;s &quot;ignore the conditions that have already been satisfied.&quot;<p>Seeing that we already returned out in condition #1 lets me focus more on condition #2.