私の理解が正しければ、あなたはあなたのリストの 6 つの項目の可能なすべての組み合わせを求めています。itertools.combinations
これを非常に簡単にする必要があります:
>>> import itertools
>>> a_list=['chicken','pizza','burger','beer','vodka','potato','fries','mustache']
>>> a_set=set(itertools.combinations(a_list, 6))
>>> pprint(a_set)
{('burger', 'beer', 'vodka', 'potato', 'fries', 'mustache'),
('chicken', 'beer', 'vodka', 'potato', 'fries', 'mustache'),
('chicken', 'burger', 'beer', 'potato', 'fries', 'mustache'),
('chicken', 'burger', 'beer', 'vodka', 'fries', 'mustache'),
('chicken', 'burger', 'beer', 'vodka', 'potato', 'fries'),
('chicken', 'burger', 'beer', 'vodka', 'potato', 'mustache'),
('chicken', 'burger', 'vodka', 'potato', 'fries', 'mustache'),
('chicken', 'pizza', 'beer', 'potato', 'fries', 'mustache'),
('chicken', 'pizza', 'beer', 'vodka', 'fries', 'mustache'),
('chicken', 'pizza', 'beer', 'vodka', 'potato', 'fries'),
('chicken', 'pizza', 'beer', 'vodka', 'potato', 'mustache'),
('chicken', 'pizza', 'burger', 'beer', 'fries', 'mustache'),
('chicken', 'pizza', 'burger', 'beer', 'potato', 'fries'),
('chicken', 'pizza', 'burger', 'beer', 'potato', 'mustache'),
('chicken', 'pizza', 'burger', 'beer', 'vodka', 'fries'),
('chicken', 'pizza', 'burger', 'beer', 'vodka', 'mustache'),
('chicken', 'pizza', 'burger', 'beer', 'vodka', 'potato'),
('chicken', 'pizza', 'burger', 'potato', 'fries', 'mustache'),
('chicken', 'pizza', 'burger', 'vodka', 'fries', 'mustache'),
('chicken', 'pizza', 'burger', 'vodka', 'potato', 'fries'),
('chicken', 'pizza', 'burger', 'vodka', 'potato', 'mustache'),
('chicken', 'pizza', 'vodka', 'potato', 'fries', 'mustache'),
('pizza', 'beer', 'vodka', 'potato', 'fries', 'mustache'),
('pizza', 'burger', 'beer', 'potato', 'fries', 'mustache'),
('pizza', 'burger', 'beer', 'vodka', 'fries', 'mustache'),
('pizza', 'burger', 'beer', 'vodka', 'potato', 'fries'),
('pizza', 'burger', 'beer', 'vodka', 'potato', 'mustache'),
('pizza', 'burger', 'vodka', 'potato', 'fries', 'mustache')}