Python groupby, the iterator swiss army knife - Program - Python - Builder AU - 0 views
-
Last week we looked at the itertools module and how its iterator based functions can be faster than doing things from scratch. One of the examples showed a function using itertools.takewhile to be much faster than one using itertools.groupby. Some feedback we got, asked, what then is the point of groupby if it's just a slower version of other functionality?