Created
September 26, 2018 00:46
-
-
Save JSkally/25566e570a756f78a523c82216d3b88c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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