• 0xff@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    What’s wrong with list comprehensions? Do I just have Stockholm Syndrome at this point?

    I would skip the square brackets and just use a generator expression: sum(3*n for n in range(5)).