minus-squareClay_pidgin@sh.itjust.workstoPython@programming.dev•Python Performance: Why 'if not list' is 2x Faster Than Using len()linkfedilinkEnglisharrow-up5·6 days agofoo = “potatoes!” len(foo) will give you the number of characters in the string. It’s not a surefire way to find a list at all! linkfedilink
foo = “potatoes!”
len(foo)
will give you the number of characters in the string. It’s not a surefire way to find a list at all!