1664
submitted 1 year ago by [email protected] to c/[email protected]
you are viewing a single comment's thread
view the rest of the comments
[-] [email protected] 17 points 1 year ago

You can reduce this readable code into one line of confusing python list comprehension that runs 100x slower!

[-] [email protected] 8 points 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)).

load more comments (2 replies)
this post was submitted on 16 Jul 2023
1664 points (96.6% liked)

Memes

45179 readers
2344 users here now

Rules:

  1. Be civil and nice.
  2. Try not to excessively repost, as a rule of thumb, wait at least 2 months to do it if you have to.

founded 5 years ago
MODERATORS