import itertools
regular_list = [[1, 2, 3, 4], [5, 6, 7], [8, 9, 10]]
flat_list = list(itertools.chain(*regular_list))
print('Original list', regular_list)
print('Transformed list', flat_list)
import itertools
List = [[1,2],[5,6],[7,9]]
list_using_itertools = list(itertools.chain(*List))
print(list_using_itertools)