Re:Ask HN: What topics/subjects are worth learning for a new...
by codingdave on Monday September 17, 2018 @08:00AM
(#18005019)
That doesn't re-build it into a linked list as his example showed. It also does multiple passes through the data, which should be fun if there are millions of items.
It is a great question for talking about performance tuning an algorithm, but just seems bizarre to be pushing for abstraction on this problem.
[x for x in my_list if x % 2 == 0] + [x for x in my_list if x % 2 != 0]