Created
November 13, 2016 00:09
-
-
Save yasyf/e8f60656d9a1fce388db427d5ec93164 to your computer and use it in GitHub Desktop.
This file contains 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
import collections | |
def flatten(l): | |
return sum(map(lambda x: x if isinstance(x, collections.Sequence) else [x], l), []) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment