622
know the features of your language
(lemmy.world)
Post funny things about programming here! (Or just rant about your favourite programming language.)
You need to be careful here though. You might not intend for
0
andNone
to mean the same thing.So this won't do the intended thing if a is 0.
Edit: Sorry I meant to reply to the parent comment, realising now you already write the exact same thing.
Also if a is an empty collection or str, or false.