this post was submitted on 22 Nov 2023
294 points (100.0% liked)

196

16293 readers
37 users here now

Be sure to follow the rule before you head out.

Rule: You must post before you leave.

^other^ ^rules^

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] frezik@midwest.social 7 points 10 months ago (1 children)

It jams far too much on one line. Break it up. It's a mistake I see a lot on Python.

[–] stebo02@sopuli.xyz 3 points 10 months ago (1 children)

but if you do it as a for loop it would be slower

[–] frezik@midwest.social 2 points 10 months ago (1 children)

Unless you're looping over more than a million elements, that's a poor excuse.

[–] stebo02@sopuli.xyz 3 points 10 months ago

or you're doing this a million times