Skip to content

Instantly share code, notes, and snippets.

@alirezaimi
Created May 8, 2013 05:45
Show Gist options
  • Save alirezaimi/5538488 to your computer and use it in GitHub Desktop.
Save alirezaimi/5538488 to your computer and use it in GitHub Desktop.
simple script
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