You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<dict>.update(<dict>) <spanclass="hljs-comment"># Adds items. Replaces ones with matching keys.</span>
275
-
[k <spanclass="hljs-keyword">for</span> k, v <spanclass="hljs-keyword">in</span> <dict>.items() <spanclass="hljs-keyword">if</span> v == value]<spanclass="hljs-comment"># Returns list of keys that point to the value.</span>
value = <dict>.pop(key) <spanclass="hljs-comment"># Removes item or raises KeyError.</span>
275
+
{k <spanclass="hljs-keyword">for</span> k, v <spanclass="hljs-keyword">in</span> <dict>.items() <spanclass="hljs-keyword">if</span> v == value}<spanclass="hljs-comment"># Returns set of keys that point to the value.</span>
276
276
{k: v <spanclass="hljs-keyword">for</span> k, v <spanclass="hljs-keyword">in</span> <dict>.items() <spanclass="hljs-keyword">if</span> k <spanclass="hljs-keyword">in</span> keys} <spanclass="hljs-comment"># Returns dictionary filtered by keys.</span>
0 commit comments