Skip to content

Instantly share code, notes, and snippets.

@SZanlongo
Created September 18, 2014 02:01
Show Gist options
  • Save SZanlongo/24ccdff6d25b83870b71 to your computer and use it in GitHub Desktop.
Save SZanlongo/24ccdff6d25b83870b71 to your computer and use it in GitHub Desktop.
Flatten matrix
# https://stackoverflow.com/questions/691946/short-and-useful-python-snippets
lol = [['a', 'b'], ['c'], ['d', 'e', 'f']]
for outer in lol:
for inner in outer:
print inner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment