itertools flatten a list of list code example
Example: flatten a list of list itertools
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)