Вы можете использовать itertools.combinations_with_replacement
, чтобы выбрать 2 раздела из 11 слотов в диапазоне от 0,0 до 1,0:
from itertools import combinations_with_replacement
[[n / 10 for n in (a, b - a, 10 - b)] for a, b in combinations_with_replacement(range(11), 2)]
Возвращает:
[[0.0, 0.0, 1.0],
[0.0, 0.1, 0.9],
[0.0, 0.2, 0.8],
[0.0, 0.3, 0.7],
[0.0, 0.4, 0.6],
[0.0, 0.5, 0.5],
[0.0, 0.6, 0.4],
[0.0, 0.7, 0.3],
[0.0, 0.8, 0.2],
[0.0, 0.9, 0.1],
[0.0, 1.0, 0.0],
[0.1, 0.0, 0.9],
[0.1, 0.1, 0.8],
[0.1, 0.2, 0.7],
[0.1, 0.3, 0.6],
[0.1, 0.4, 0.5],
[0.1, 0.5, 0.4],
[0.1, 0.6, 0.3],
[0.1, 0.7, 0.2],
[0.1, 0.8, 0.1],
[0.1, 0.9, 0.0],
[0.2, 0.0, 0.8],
[0.2, 0.1, 0.7],
[0.2, 0.2, 0.6],
[0.2, 0.3, 0.5],
[0.2, 0.4, 0.4],
[0.2, 0.5, 0.3],
[0.2, 0.6, 0.2],
[0.2, 0.7, 0.1],
[0.2, 0.8, 0.0],
[0.3, 0.0, 0.7],
[0.3, 0.1, 0.6],
[0.3, 0.2, 0.5],
[0.3, 0.3, 0.4],
[0.3, 0.4, 0.3],
[0.3, 0.5, 0.2],
[0.3, 0.6, 0.1],
[0.3, 0.7, 0.0],
[0.4, 0.0, 0.6],
[0.4, 0.1, 0.5],
[0.4, 0.2, 0.4],
[0.4, 0.3, 0.3],
[0.4, 0.4, 0.2],
[0.4, 0.5, 0.1],
[0.4, 0.6, 0.0],
[0.5, 0.0, 0.5],
[0.5, 0.1, 0.4],
[0.5, 0.2, 0.3],
[0.5, 0.3, 0.2],
[0.5, 0.4, 0.1],
[0.5, 0.5, 0.0],
[0.6, 0.0, 0.4],
[0.6, 0.1, 0.3],
[0.6, 0.2, 0.2],
[0.6, 0.3, 0.1],
[0.6, 0.4,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