209
Python Performance: Why 'if not list' is 2x Faster Than Using len()
(blog.codingconfessions.com)
This is a most excellent place for technology news and articles.
so these are the only 2 ways then? huge if true
Oh, there are plenty of other terrible ways:
I could probably come up with a few others as well.
Please note that none of these handles the
TypeError
ifmylist is None
.