Skip to content

Instantly share code, notes, and snippets.

@fulibacsi
Created March 7, 2018 14:39
Show Gist options
  • Save fulibacsi/64ea7b38b7eb566fe0e8052aa82caa63 to your computer and use it in GitHub Desktop.
Save fulibacsi/64ea7b38b7eb566fe0e8052aa82caa63 to your computer and use it in GitHub Desktop.
chunker function in python
def chunk(seq, size):
return (seq[pos:pos + size] for pos in range(0, len(seq), size))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment