Browse Source

Pretty print

pull/44/head
Jure Šorn 5 years ago
parent
commit
651fff3966
2 changed files with 4 additions and 8 deletions
  1. 6
      README.md
  2. 6
      index.html

6
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)
```

6
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">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> pprint <span class="hljs-keyword">import</span> pprint
<span class="hljs-meta">&gt;&gt;&gt; </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(&lt;collection&gt;, 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>

|||||||
100:0
Loading…
Cancel
Save