Last active
January 24, 2017 21:38
-
-
Save DJMcMayhem/c7c8cffb4b7ea97238da9d7e1ef15353 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import itertools as it | |
a = ["ais532", "Anders Kaseorg", "Dennis", "DJMcMayhem", "Martin Ender", "udioica", "Primo", "Martin Ender"] | |
b = ["Martin Ender", "Dennis", "Luis Mendo", "DJMcMayhem", "Nimi", "AdmBorkBork", "Mego", "Nathan Merrill"] | |
combos = list(list(zip(x, b)) for x in it.permutations(a, len(b))) | |
print(len(combos)) | |
good_combos = [] | |
for combo in combos: | |
if all(pair[0] != pair[1] for pair in combo): | |
good_combos.append(combo) | |
print(len(good_combos)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment