• riodoro1@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    23 days ago

    That’s exactly what I was getting at. Getting length of an empty list would not even enter the loop.

    • ChaoticNeutralCzech
      link
      fedilink
      English
      arrow-up
      1
      ·
      23 days ago

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