MCPcopy Create free account
hub / github.com/ipython/ipython / chop

Function chop

IPython/utils/data.py:26–28  ·  view source on GitHub ↗

Chop a sequence into chunks of the given size.

(seq, size)

Source from the content-addressed store, hash-verified

24
25
26def chop(seq, size):
27 """Chop a sequence into chunks of the given size."""
28 return [seq[i:i+size] for i in range(0,len(seq),size)]
29
30

Callers 1

page_dumbFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected