![](https://secure.gravatar.com/avatar/4c01705256aa2160c1354790e8c154db.jpg?s=120&d=mm&r=g)
Sept. 29, 2013
8:42 p.m.
29.09.13 07:06, Clay Sweetser написав(ла):
I would like to propose that this function, or one very similar to it, be added to the standard library, either in the itertools module, or the standard namespace. If nothing else, doing so would at least give a single *obvious* way to exhaust an iterator, instead of the several miscellaneous methods available.
I prefer optimize the for loop so that it will be most efficient way (it is already most obvious way).