5SpeedDeasil@lemmy.world to Memes@lemmy.ml · 2 years agoRandom internet people explaining math better then math teacheri.imgur.comexternal-linkmessage-square102fedilinkarrow-up162arrow-down15
arrow-up157arrow-down1external-linkRandom internet people explaining math better then math teacheri.imgur.com5SpeedDeasil@lemmy.world to Memes@lemmy.ml · 2 years agomessage-square102fedilink
minus-squarehorni3000@feddit.delinkfedilinkarrow-up0·2 years agoYou can reduce this readable code into one line of confusing python list comprehension that runs 100x slower!
minus-square0xff@lemmy.worldlinkfedilinkarrow-up0·2 years agoWhat’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)).
You can reduce this readable code into one line of confusing python list comprehension that runs 100x slower!
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))
.