Skip to content

Instantly share code, notes, and snippets.

@bencord0
Created November 1, 2012 13:34
Show Gist options
  • Save bencord0/3993660 to your computer and use it in GitHub Desktop.
Save bencord0/3993660 to your computer and use it in GitHub Desktop.
Like pprint, but prints horizontally.
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