Are you looking for something like this?
from itertools import product
p = list(product([1,2,3], repeat = 2))
a = [str(p[:-i]) for i in range(1, len(p))]
Setareh.gh (3.8 KB)
2 Likes
Are you looking for something like this?
from itertools import product
p = list(product([1,2,3], repeat = 2))
a = [str(p[:-i]) for i in range(1, len(p))]
Setareh.gh (3.8 KB)