Jason Novinger@programming.devM to Python@programming.dev · 1 year agoPython Performance: Why 'if not list' is 2x Faster Than Using len()blog.codingconfessions.comexternal-linkmessage-square53linkfedilinkarrow-up167arrow-down14cross-posted to: technology@lemmy.world
arrow-up163arrow-down1external-linkPython Performance: Why 'if not list' is 2x Faster Than Using len()blog.codingconfessions.comJason Novinger@programming.devM to Python@programming.dev · 1 year agomessage-square53linkfedilinkcross-posted to: technology@lemmy.world
minus-squareMichal@programming.devlinkfedilinkarrow-up6·1 year agoIt’s just how pythonic code is written. All python developers know that not and bool can indicate that variable is either empty or null. They will also use the in operator and other python specific syntax.
It’s just how pythonic code is written. All python developers know that
notandboolcan indicate that variable is either empty or null. They will also use theinoperator and other python specific syntax.