minus-squaresebsch@discuss.tchncs.detoPython@programming.dev•Python Performance: Why 'if not list' is 2x Faster Than Using len()linkfedilinkarrow-up8arrow-down3·23 days agoI never understood that argument. If you can be sure the type is a collection (and this you always should) not list is so moch easier to read and understood than the length check. linkfedilink
I never understood that argument. If you can be sure the type is a collection (and this you always should)
not list
is so moch easier to read and understood than the length check.