Created
November 1, 2012 13:34
-
-
Save bencord0/3993660 to your computer and use it in GitHub Desktop.
Like pprint, but prints horizontally.
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
def widthprint(lst, width=5): | |
for n, i in enumerate(lst): | |
if n % width == 0: | |
print('') | |
print i, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment