DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
python unlist flatten nested lists
def flatten(x): if isinstance(x, list): return [a for i in x for a in flatten(i)] else: return [x]
PREVIOUS
NEXT
Tagged:
#python
#unlist
#flatten
#nested
#lists
ADD COMMENT
Topic
COMMENT
Name
4+1 =
Submit