Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def gendat(x):
- if isinstance(x, int):
- return [x]
- elif len(x)==0:
- return []
- else:
- list y = []
- for n in x:
- y.extend(gendat(n))
- return y
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement