|
@ -475,8 +475,12 @@ Point(x=<span class="hljs-number">1</span>, y=<span class="hljs-number">2</span> |
|
|
{<span class="hljs-number">90</span>:b} <span class="hljs-comment"># '1011010'</span> |
|
|
{<span class="hljs-number">90</span>:b} <span class="hljs-comment"># '1011010'</span> |
|
|
</code></pre> |
|
|
</code></pre> |
|
|
<h2 id="numbers"><a href="#numbers" name="numbers">#</a>Numbers</h2> |
|
|
<h2 id="numbers"><a href="#numbers" name="numbers">#</a>Numbers</h2> |
|
|
|
|
|
<pre><code class="python language-python hljs"><int> = int(<float/str/bool>) <span class="hljs-comment"># Or: math.floor(<float>)</span> |
|
|
|
|
|
<float> = float(<int/str/bool>) |
|
|
|
|
|
<complex> = complex(real=<span class="hljs-number">0</span>, imag=<span class="hljs-number">0</span>) <span class="hljs-comment"># Or: <real> + <real>j</span> |
|
|
|
|
|
</code></pre> |
|
|
<h3 id="basicfunctions">Basic Functions</h3> |
|
|
<h3 id="basicfunctions">Basic Functions</h3> |
|
|
<pre><code class="python language-python hljs"><num> = pow(<num>, <num>) <span class="hljs-comment"># Or: <num> ** <num></span> |
|
|
|
|
|
|
|
|
<pre><code class="python language-python hljs"><num> = pow(<num>, <num>) <span class="hljs-comment"># Or: <num> ** <num></span> |
|
|
<real> = abs(<num>) |
|
|
<real> = abs(<num>) |
|
|
<int> = round(<real>) |
|
|
<int> = round(<real>) |
|
|
<real> = round(<real>, ±ndigits) |
|
|
<real> = round(<real>, ±ndigits) |
|
@ -1281,7 +1285,7 @@ db.commit() |
|
|
<li><strong><code class="python hljs"><span class="hljs-string">'d'</span></code> - double (8)</strong></li> |
|
|
<li><strong><code class="python hljs"><span class="hljs-string">'d'</span></code> - double (8)</strong></li> |
|
|
</ul> |
|
|
</ul> |
|
|
<h2 id="array"><a href="#array" name="array">#</a>Array</h2> |
|
|
<h2 id="array"><a href="#array" name="array">#</a>Array</h2> |
|
|
<p><strong>List that can hold only elements of predefined type. Available types are listed above.</strong></p> |
|
|
|
|
|
|
|
|
<p><strong>List that can hold only elements of predefined type. Available types and their sizes are listed above.</strong></p> |
|
|
<pre><code class="python language-python hljs"><span class="hljs-keyword">from</span> array <span class="hljs-keyword">import</span> array |
|
|
<pre><code class="python language-python hljs"><span class="hljs-keyword">from</span> array <span class="hljs-keyword">import</span> array |
|
|
<array> = array(<span class="hljs-string">'<typecode>'</span> [, <collection>]) |
|
|
<array> = array(<span class="hljs-string">'<typecode>'</span> [, <collection>]) |
|
|
</code></pre> |
|
|
</code></pre> |
|
|