chainsol

Untitled

Jul 26th, 2017
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.13 KB | None | 0 0
  1. def chunks(l, n):
  2.     """Yield successive n-sized chunks from l."""
  3.     for i in xrange(0, len(l), n):
  4.         yield l[i:i + n]
Advertisement
Add Comment
Please, Sign In to add comment