Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Flatten List in Python Using Shallow Flattening

List = [[0,1,2],[3,4,5]]
shallow_flatten_list = []
for nested_list in List:
    for item in nested_list:
        shallow_flatten_list.append(item)
print(shallow_flatten_list)
Source by softhunt.net #
 
PREVIOUS NEXT
Tagged: #Flatten #List #Python #Using #Shallow #Flattening
ADD COMMENT
Topic
Name
4+1 =