Python explicit condition checking compared to implicit <p>Not sure if this belongs to SO, community moderators please move this to the appropriate network website if that's indeed the case. </p> <p>One of the foremost tenets of writing pythonic code is "Explicit is better than implicit".</p> <p>In a number of places I see the suggestion that when checking for true values:</p> <pre><code>if a: print 'eggs' </code></pre> <p>is better than</p> <pre><code>if a == true: print 'spam' </code></pre> <p>The second one if clearly more explicit (or is it?), not sure why the first approach is favored. I personally like the first approach as it is less and (arguably) cleaner code. Is this a matter of personal choice or am I missing something here?</p>