Skip to content

Instantly share code, notes, and snippets.

@qbyt
Created May 1, 2012 15:24
Show Gist options
  • Save qbyt/2568782 to your computer and use it in GitHub Desktop.
Save qbyt/2568782 to your computer and use it in GitHub Desktop.
tweets + blocks
blocks = range(12)
tweets = ["one", "two", "three"]
def chunk(l, n):
for i in xrange(0, len(l), n):
yield l[i:i+n]
zip(list(chunk(blocks, 3)), tweets)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment