@@ -475,8 +475,12 @@ <h4 id="inttypes">Int types:</h4>
475
475
{< span class ="hljs-number "> 90</ span > :b} < span class ="hljs-comment "> # '1011010'</ span >
476
476
</ code > </ pre >
477
477
< h2 id ="numbers "> < a href ="#numbers " name ="numbers "> #</ a > Numbers</ h2 >
478
+ < pre > < code class ="python language-python hljs "> <int> = int(<float/str/bool>) < span class ="hljs-comment "> # Or: math.floor(<float>)</ span >
479
+ <float> = float(<int/str/bool>)
480
+ <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 >
481
+ </ code > </ pre >
478
482
< h3 id ="basicfunctions "> Basic Functions</ h3 >
479
- < pre > < code class ="python language-python hljs "> <num> = pow(<num>, <num>) < span class ="hljs-comment "> # Or: <num> ** <num></ span >
483
+ < pre > < code class ="python language-python hljs "> <num> = pow(<num>, <num>) < span class ="hljs-comment "> # Or: <num> ** <num></ span >
480
484
<real> = abs(<num>)
481
485
<int> = round(<real>)
482
486
<real> = round(<real>, ±ndigits)
@@ -1281,7 +1285,7 @@ <h4 id="usecapitalletterforunsignedtypestandardsizesareinbrackets">Use capital l
1281
1285
< li > < strong > < code class ="python hljs "> < span class ="hljs-string "> 'd'</ span > </ code > - double (8)</ strong > </ li >
1282
1286
</ ul >
1283
1287
< h2 id ="array "> < a href ="#array " name ="array "> #</ a > Array</ h2 >
1284
- < p > < strong > List that can hold only elements of predefined type. Available types are listed above.</ strong > </ p >
1288
+ < p > < strong > List that can hold only elements of predefined type. Available types and their sizes are listed above.</ strong > </ p >
1285
1289
< pre > < code class ="python language-python hljs "> < span class ="hljs-keyword "> from</ span > array < span class ="hljs-keyword "> import</ span > array
1286
1290
<array> = array(< span class ="hljs-string "> '<typecode>'</ span > [, <collection>])
1287
1291
</ code > </ pre >
0 commit comments