All Questions
Tagged with more-itertools combinatorics
2 questions
1
vote
1
answer
49
views
Find if a set of lists of 2 values are the result of the possible combination of a n-value list
I have used itertools to find all possible 2-element combination (without repetition) from a set of 10 elements to which I have applied some filtering to reduce the 2-element combination based on ...
0
votes
4
answers
554
views
How to introduce constraints using Python itertools.product()?
The following script generates 4-character permutations of set s and outputs to file:
import itertools
s = ['1', '2', '3', '4', '!']
l = list(itertools.product(s, repeat=4))
with open('output1.txt',...