Browse Source

Dictionary

pull/135/merge
Jure Šorn 3 months ago
parent
commit
bfb81f191a
2 changed files with 4 additions and 4 deletions
  1. 4
      README.md
  2. 4
      index.html

4
README.md

@ -82,8 +82,8 @@ Dictionary
```
```python
<view> = <dict>.keys() # Coll. of keys that reflects changes.
<view> = <dict>.values() # Coll. of values that reflects changes.
<view> = <dict>.keys() # Collection of keys that reflects changes.
<view> = <dict>.values() # Collection of values that reflects changes.
<view> = <dict>.items() # Coll. of key-value tuples that reflects chgs.
```

4
index.html

@ -138,8 +138,8 @@ flatter_list = list(itertools.chain.from_iterable(&lt;list&gt;))
<div><h2 id="dictionary"><a href="#dictionary" name="dictionary">#</a>Dictionary</h2><pre><code class="python language-python hljs">&lt;dict&gt; = {key_1: val_1, key_2: val_2, ...} <span class="hljs-comment"># Use `&lt;dict&gt;[key]` to get or set the value.</span>
</code></pre></div>
<pre><code class="python language-python hljs">&lt;view&gt; = &lt;dict&gt;.keys() <span class="hljs-comment"># Coll. of keys that reflects changes.</span>
&lt;view&gt; = &lt;dict&gt;.values() <span class="hljs-comment"># Coll. of values that reflects changes.</span>
<pre><code class="python language-python hljs">&lt;view&gt; = &lt;dict&gt;.keys() <span class="hljs-comment"># Collection of keys that reflects changes.</span>
&lt;view&gt; = &lt;dict&gt;.values() <span class="hljs-comment"># Collection of values that reflects changes.</span>
&lt;view&gt; = &lt;dict&gt;.items() <span class="hljs-comment"># Coll. of key-value tuples that reflects chgs.</span>
</code></pre>
<pre><code class="python language-python hljs">value = &lt;dict&gt;.get(key, default=<span class="hljs-keyword">None</span>) <span class="hljs-comment"># Returns default if key is missing.</span>

Loading…
Cancel
Save