2 ms·
Most Python people are okay with relying on the behaviour of what is truthful and what is not. They would often prefer to see if foo: do_stuff() o
by koenigdavidmj 16y ago
Most Python people are okay with relying on the behaviour of what is truthful and what is not. They would often prefer to see
if foo:
do_stuff()
over
if len(foo) > 0:
do_stuff()