Skip to content

TypeScript code snippet – How to medrge lists of lists?

import itertools
a = [['a','b'], ['c']]
print(list(itertools.chain.from_iterable(a)))
See also  Python code snippet - How to create a list of repeated values ?

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.