Created
April 13, 2017 04:56
-
-
Save graup/c3b0c5eef4105d8283297bcb47f23d64 to your computer and use it in GitHub Desktop.
Revisions
-
graup created this gist
Apr 13, 2017 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ 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]))