Created
October 14, 2022 17:36
-
-
Save galenseilis/a5dac019546fe0629cb6b4609cd58abc to your computer and use it in GitHub Desktop.
This file contains 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
from itertools import permutations | |
names = ['Amelia', 'Boris', 'Carlos', 'Dara'] | |
for p in permutations(names): | |
if p.index('Dara') >= p.index('Amelia'): | |
continue | |
elif p.index('Boris') == 2: | |
continue | |
elif abs(p.index('Amelia') - p.index('Carlos')) != 3: | |
continue | |
else: | |
print(p) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment