programming-examples/python/List/Python program to flatten a shallow list.py
2019-11-15 12:59:38 +01:00

4 lines
154 B
Python

import itertools
original_list = [[2,4,3],[1,5,6], [9], [7,9,0]]
new_merged_list = list(itertools.chain(*original_list))
print(new_merged_list)