[Solved] How to create the following lists with list comprehensions? [closed]


your first question:
[i for i in range(n) for j in range(5)]

your second question:
[j for i in range(k) for j in range(1,6)]

where k is the number of repeats

5

solved How to create the following lists with list comprehensions? [closed]