Flatten a List of Lists
Medium · Comprehensions
A list comprehension can have more than one for. They read left to right, like nested loops: [x for row in rows for x in row] visits every row, then every item in that row.
Write flatten(groups) that takes a list of lists and returns one flat list with all the items, in order. Only flatten one level: lists inside the inner lists stay as they are.