Kaydet (Commit) 9ae94733 authored tarafından Raymond Hettinger's avatar Raymond Hettinger

Make it easier to search for the grouper() recipe.

üst 86a20f83
......@@ -705,7 +705,8 @@ which incur interpreter overhead.
return zip(a, b)
def grouper(n, iterable, fillvalue=None):
"grouper(3, 'ABCDEFG', 'x') --> ABC DEF Gxx"
"Collect data into fixed-length chunks or blocks"
# grouper(3, 'ABCDEFG', 'x') --> ABC DEF Gxx"
args = [iter(iterable)] * n
return zip_longest(*args, fillvalue=fillvalue)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment