Skip to content

Instantly share code, notes, and snippets.

@JSkally
Created September 26, 2018 00:46
Show Gist options
  • Save JSkally/25566e570a756f78a523c82216d3b88c to your computer and use it in GitHub Desktop.
Save JSkally/25566e570a756f78a523c82216d3b88c to your computer and use it in GitHub Desktop.
# Takes a list of lists 'l' and returns a flattened list of the elements and subelements of l
def flatten(l):
return reduce(lambda x,y:x+y,l)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment