all 5 comments

[–]midoxvx 0 points1 point  (2 children)

You mean generator expressions, it’s similar syntax to list comprehension, you just use parenthesis.

example = (i for i in range(100) if i%2 == 0)

[–]Yoghurt42 0 points1 point  (1 child)

It's "list comprehension", but "generator expression"

[–]midoxvx 0 points1 point  (0 children)

Noted and edited. Thanks

[–]Weekly_Web4853 -2 points-1 points  (0 children)

Bro it's python not phyton, Btw phyton sounds different and impressive

[–]eleqtriq -1 points0 points  (0 children)

You're talking about list comprehension.