Skip to content

Instantly share code, notes, and snippets.

@SealtielFreak
Created May 27, 2024 19:50
Show Gist options
  • Save SealtielFreak/ca0d7ea69280b8932934b2b3ddc324c9 to your computer and use it in GitHub Desktop.
Save SealtielFreak/ca0d7ea69280b8932934b2b3ddc324c9 to your computer and use it in GitHub Desktop.
import itertools
all_components = 'AB', 'CD', 'EF'
first = all_components[0]
for r in itertools.product(first, *all_components[1:]):
print(*r)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment