Skip to content

Instantly share code, notes, and snippets.

@daryltucker
Created February 13, 2014 20:08
Show Gist options
  • Save daryltucker/8982831 to your computer and use it in GitHub Desktop.
Save daryltucker/8982831 to your computer and use it in GitHub Desktop.
Python Pretty Print Helper Function
import pprint
def pp(data, ro=False):
"""Format for pretty print."""
if not ro:
pprint.pprint(data, indent=4, width=10)
return pprint.pformat(data, indent=4, width=10)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment