List comprehensions vs generator expressions

https://slicker.me/python/listcomp-vs-genexp.html

5 points · 5 comments · view on lemmy.world

5 Comments

littleomid@feddit.org · 4 pts · 47d (1 reply)

The article feels AI generated.

NoPanko@feddit.uk · 2 pts · 47d

I hate how often I get this feeling recently, far too much of the internet is now ai generated

bterwijn@programming.dev · 3 pts · 45d

I like to use this example with my students: https://github.com/bterwijn/memory_graph#lazy-evaluation

logging_strict@programming.dev · 1 pts · 45d (1 reply)

Better question is Iterator or Generator?

Identify where itertools or itertools-more should be used instead.

The later question i don't have an answer to. If anyone wants to take a crack at it.

logging_strict@programming.dev · 1 pts · 45d

Identify where itertools or itertools-more should be used instead.

Found this which is Rust-free

https://pypi.org/project/refurb/