Skip to content

Commit 651fff3

Browse files
committed
Pretty print
1 parent 6734980 commit 651fff3

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1443,10 +1443,8 @@ print(<el_1>, ..., sep=' ', end='\n', file=sys.stdout, flush=False)
14431443

14441444
### Pretty Print
14451445
```python
1446-
>>> from pprint import pprint
1447-
>>> pprint(dir())
1448-
['__annotations__',
1449-
'__builtins__', ...]
1446+
from pprint import pprint
1447+
pprint(<collection>, stream=None, width=80)
14501448
```
14511449

14521450

index.html

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1338,10 +1338,8 @@
13381338
<li><strong>Use <code class="python hljs"><span class="hljs-string">'file=sys.stderr'</span></code> for errors.</strong></li>
13391339
<li><strong>Use <code class="python hljs"><span class="hljs-string">'flush=True'</span></code> to forcibly flush the stream.</strong></li>
13401340
</ul>
1341-
<div><h3 id="prettyprint">Pretty Print</h3><pre><code class="python language-python hljs"><span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> pprint <span class="hljs-keyword">import</span> pprint
1342-
<span class="hljs-meta">&gt;&gt;&gt; </span>pprint(dir())
1343-
[<span class="hljs-string">'__annotations__'</span>,
1344-
<span class="hljs-string">'__builtins__'</span>, ...]
1341+
<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
1342+
pprint(&lt;collection&gt;, stream=<span class="hljs-keyword">None</span>, width=<span class="hljs-number">80</span>)
13451343
</code></pre></div>
13461344

13471345
<div><h2 id="input"><a href="#input" name="input">#</a>Input</h2><ul>

0 commit comments

Comments
 (0)