python multilevel list comprehension

Solutions on MaxInterview for python multilevel list comprehension by the best coders in the world

showing results for - "python multilevel list comprehension"
Basil
02 Oct 2018
1>>> [y for x in non_flat for y in x]
2[1, 2, 3, 4, 5, 6, 7, 8]
3
Emily
19 Sep 2016
1>>> [ y for x in non_flat if len(x) > 2 for y in x ]
2[1, 2, 3, 4, 5, 6]
3
similar questions
queries leading to this page
python multilevel list comprehension