If I have this list comprehension:
[list(range(0,x)) for x in [1, 2, 3]]
I get
[[0], [0, 1], [0, 1, 2]]
But I would like to get:
[0, 0, 1, 0, 1, 2]
Noticed that the example above is just a minimal example.
I have read a lot of SO questions that explain how to flatten a list of lists but I have found nothing on how to avoid the creation of sublist inside the list comprehension.