Q:

Write a Python program to flatten a shallow list

0

Write a Python program to flatten a shallow list.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

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)

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now