Comment on Python Performance: Why 'if not list' is 2x Faster Than Using len()

<- View Parent
ChaoticNeutralCzech@feddit.org ⁨1⁩ ⁨week⁩ ago

Yes. If it’s empty. But in cases where you need to check, it might as well not be.

source
Sort:hotnewtop