Created
April 13, 2017 04:56
-
-
Save graup/c3b0c5eef4105d8283297bcb47f23d64 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
from itertools import permutations | |
# Generate permutations | |
p = list(permutations('1234', 4)) | |
# Flip table for display in columns | |
flipped = [[p[j][i] for j in range(4*3*2)] for i in range(4)] | |
# Print table | |
print("\n".join([" ".join(row) for row in flipped])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment