Python – Using the Multiply Operator to Create Copies of Objects in Lists [duplicate]

This is a good usage of list comprehension – its also the most readable way to do it IMO.

So the [[] for x in range(0,3)] you suggest isn’t the multiplication operator, but gets the result you want.

Leave a Comment