Skip to content

Instantly share code, notes, and snippets.

@zelark
Created March 24, 2014 22:27
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 zelark/9750680 to your computer and use it in GitHub Desktop.
Save zelark/9750680 to your computer and use it in GitHub Desktop.
a = [[1, 2], [3, 4], [5, 6]]
b = [x for l in a for x in l]
# b = [1, 2, 3, 4, 5, 6]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment