Flatten List in Python With Itertools

44

import itertools
List = [[1,2],[5,6],[7,9]]
list_using_itertools = list(itertools.chain(*List))
print(list_using_itertools)

Comments

Submit
0 Comments