Commit 4b8fd45a authored by David Hrbáč's avatar David Hrbáč

Script to generate combinations

parent d24d7e1a
import itertools
import re
l = ['A', 'S', 'U', 'T']
mask = ''.join(reversed(l))
for i in range(1,len(l)+1):
for comb in itertools.combinations(l, i):
reg = "[^%s]" % ''.join(comb)
print re.sub(reg,"-", mask)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment