Basilico
Basilico

Reputation: 3

how to create a dynamic list in a loop where all combinations are tried from 1 to 360 is inserted and removed

I want to create a dynamic List i Python that will go in to a loop. The loop will be like.

for t in range(360):
   list = [?]
   # "more code to come"

The list will be dynamic and will change as followed while looping.

list = [1]
list = [1, 2]
list = [1, 2, 3, n]
list = [1, 3]
list = [1, 3, 4, n]

After all combinations with 1 it will loop to 2 and make the same.

list = [2]
list = [2, 3]
list = [2, 3, 4, n]
list = [2, 4]
list = [2, 4, 5, n]

The list will go in to a model that will be in the loop.

Upvotes: 0

Views: 40

Answers (0)

Related Questions