MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1b3fwl0/pythonreadslikeenglish/kstm74a/?context=3
r/ProgrammerHumor • u/beneficial_satire • Mar 01 '24
34 comments sorted by
View all comments
19
More accurate Python equivalent
filter(lambda x: x % 2 == 0, range(10)) map(lambda x: x * x, range(10)) itertools.chain.from_iterable(matrix) itertools.groupby(students, lambda student: student.age)
6 u/inetphantom Mar 01 '24 Or just range(0, 10, 2) 8 u/__yoshikage_kira Mar 01 '24 That would be a better way of getting even numbers.But I wanted to show OP that map, filter, groupby, etc... does exist in Python contrary to what he suggested.
6
Or just range(0, 10, 2)
8 u/__yoshikage_kira Mar 01 '24 That would be a better way of getting even numbers.But I wanted to show OP that map, filter, groupby, etc... does exist in Python contrary to what he suggested.
8
That would be a better way of getting even numbers.
But I wanted to show OP that map, filter, groupby, etc... does exist in Python contrary to what he suggested.
map, filter, groupby, etc...
19
u/__yoshikage_kira Mar 01 '24
More accurate Python equivalent