Skip to content

Instantly share code, notes, and snippets.

@KelSolaar
Created September 19, 2012 11:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KelSolaar/3749226 to your computer and use it in GitHub Desktop.
Save KelSolaar/3749226 to your computer and use it in GitHub Desktop.
Flatten Lists Of Lists
a = [1,2,3]
b = [4,5,6]
print zip(a,b)
import itertools
print list(itertools.chain.from_iterable(zip(a,b)))
print sum(map(list, zip(a,b)), [])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment