Skip to content
Snippets Groups Projects
Commit 4b8fd45a authored by David Hrbáč's avatar David Hrbáč
Browse files

Script to generate combinations

parent d24d7e1a
No related branches found
No related tags found
No related merge requests found
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)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment