Created
May 8, 2013 05:45
-
-
Save alirezaimi/5538488 to your computer and use it in GitHub Desktop.
simple script
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
l= [[['ali']], [1, 2, [3],[[[4]]]], [[[[[[2]],[[3]]]]], [34]]] | |
p= [] | |
def ll(a): | |
for i in a: | |
if not isinstance(i, list): | |
p.append(i) | |
else: | |
ll(i) | |
return(p) | |
print(ll(l)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment