<div><h3id="encode-1">Encode</h3><pre><codeclass="python language-python hljs"><bytes> = bytes(<coll_of_ints>) <spanclass="hljs-comment"># Ints must be in range from 0 to 255.</span>
<bytes> = bytes.fromhex(<spanclass="hljs-string">'<hex>'</span>) <spanclass="hljs-comment"># Hex pairs can be separated by spaces.</span>
<bytes> = bytes.fromhex(<spanclass="hljs-string">'<hex>'</span>) <spanclass="hljs-comment"># Hex pairs can be separated by whitespaces.</span>
</code></pre></div>
<div><h3id="decode-1">Decode</h3><pre><codeclass="python language-python hljs"><list> = list(<bytes>) <spanclass="hljs-comment"># Returns ints in range from 0 to 255.</span>
<div><h3id="readbytesfromfile">Read Bytes from File</h3><pre><codeclass="python language-python hljs"><spanclass="hljs-function"><spanclass="hljs-keyword">def</span><spanclass="hljs-title">read_bytes</span><spanclass="hljs-params">(filename)</span>:</span>
@ -2137,11 +2137,11 @@ Line # Mem usage Increment Line Contents
4 38.477 MiB 0.465 MiB b = {*range(10000)}
</code></pre>
<div><h3id="callgraph">Call Graph</h3><div><h4id="generatesapngimageofthecallgraphwithhighlightedbottlenecks">Generates a PNG image of the call graph with highlighted bottlenecks:</h4><pre><codeclass="python language-python hljs"><spanclass="hljs-comment"># $ pip3 install pycallgraph2</span>