Skip to content

Instantly share code, notes, and snippets.

@ericfourrier
Created December 16, 2015 14:44
Show Gist options
  • Save ericfourrier/3dbfce9eece67a31ae1e to your computer and use it in GitHub Desktop.
Save ericfourrier/3dbfce9eece67a31ae1e to your computer and use it in GitHub Desktop.
def flatten_list(x):
return [y for l in x for y in flatten_list(l)] if isinstance(x,list) else [x]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment