Skip to content

Instantly share code, notes, and snippets.

@nickgarvey
Created March 30, 2015 04:33
Show Gist options
  • Save nickgarvey/fd660fbad976104473fd to your computer and use it in GitHub Desktop.
Save nickgarvey/fd660fbad976104473fd to your computer and use it in GitHub Desktop.
list_of_lists = [[1,2,3], [4,5,6]]
flattened_list = [element
for lst in list_of_lists
for element in lst]
print flattened_list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment