From 651fff3966773dcba267eb9457bbeabe6ed50ab6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= <sornjure@gmail.com> Date: Sun, 8 Sep 2019 16:54:16 +0200 Subject: [PATCH] Pretty print --- README.md | 6 ++---- index.html | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 878a33b..ec961bd 100644 --- a/README.md +++ b/README.md @@ -1443,10 +1443,8 @@ print(<el_1>, ..., sep=' ', end='\n', file=sys.stdout, flush=False) ### Pretty Print ```python ->>> from pprint import pprint ->>> pprint(dir()) -['__annotations__', - '__builtins__', ...] +from pprint import pprint +pprint(<collection>, stream=None, width=80) ``` diff --git a/index.html b/index.html index 4ad452d..387f016 100644 --- a/index.html +++ b/index.html @@ -1338,10 +1338,8 @@ LogicOp = Enum(<span class="hljs-string">'LogicOp'</span>, {<span class="hljs-st <li><strong>Use <code class="python hljs"><span class="hljs-string">'file=sys.stderr'</span></code> for errors.</strong></li> <li><strong>Use <code class="python hljs"><span class="hljs-string">'flush=True'</span></code> to forcibly flush the stream.</strong></li> </ul> -<div><h3 id="prettyprint">Pretty Print</h3><pre><code class="python language-python hljs"><span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> pprint <span class="hljs-keyword">import</span> pprint -<span class="hljs-meta">>>> </span>pprint(dir()) -[<span class="hljs-string">'__annotations__'</span>, - <span class="hljs-string">'__builtins__'</span>, ...] +<div><h3 id="prettyprint">Pretty Print</h3><pre><code class="python language-python hljs"><span class="hljs-keyword">from</span> pprint <span class="hljs-keyword">import</span> pprint +pprint(<collection>, stream=<span class="hljs-keyword">None</span>, width=<span class="hljs-number">80</span>) </code></pre></div> <div><h2 id="input"><a href="#input" name="input">#</a>Input</h2><ul>