|
|
@ -482,11 +482,11 @@ to_exclusive = <range>.stop |
|
|
|
<str> = bin(<int>) <span class="hljs-comment"># Returns '[-]0b<bin>'.</span> |
|
|
|
</code></pre></div> |
|
|
|
|
|
|
|
<div><h3 id="bitwiseoperators">Bitwise Operators</h3><pre><code class="python language-python hljs"><int> = <int> & <int> <span class="hljs-comment"># And: `0b1100 & 0b1010 == 0b1000`.</span> |
|
|
|
<int> = <int> | <int> <span class="hljs-comment"># Or: `0b1100 | 0b1010 == 0b1110`.</span> |
|
|
|
<int> = <int> ^ <int> <span class="hljs-comment"># Xor: `0b1100 ^ 0b1010 == 0b0110`.</span> |
|
|
|
<int> = <int> << n_bits <span class="hljs-comment"># Left shift (>> for right)</span> |
|
|
|
<int> = ~<int> <span class="hljs-comment"># Not (also: -<int> - 1)</span> |
|
|
|
<div><h3 id="bitwiseoperators">Bitwise Operators</h3><pre><code class="python language-python hljs"><int> = <int> & <int> <span class="hljs-comment"># And (0b1100 & 0b1010 == 0b1000).</span> |
|
|
|
<int> = <int> | <int> <span class="hljs-comment"># Or (0b1100 | 0b1010 == 0b1110).</span> |
|
|
|
<int> = <int> ^ <int> <span class="hljs-comment"># Xor (0b1100 ^ 0b1010 == 0b0110).</span> |
|
|
|
<int> = <int> << n_bits <span class="hljs-comment"># Left shift (>> for right).</span> |
|
|
|
<int> = ~<int> <span class="hljs-comment"># Not (also: -<int> - 1).</span> |
|
|
|
</code></pre></div> |
|
|
|
|
|
|
|
<div><h2 id="combinatorics"><a href="#combinatorics" name="combinatorics">#</a>Combinatorics</h2><ul> |
|
|
|