list.extend and list comprehension [duplicate]

Stacked LCs.

[y for x in a for y in [x[0]] * x[1]]

Leave a Comment