This is a most excellent place for technology news and articles.
Yes, the first example does the same thing, but there's still less to mentally parse. Ideally you should just use if len(my list) == 0:.
if len(my list) == 0:
Yes, the first example does the same thing, but there's still less to mentally parse. Ideally you should just use
if len(my list) == 0:
.