Browse Source

Hex

pull/36/head
Jure Šorn 5 years ago
parent
commit
4c5841ea4c
2 changed files with 2 additions and 2 deletions
  1. 2
      README.md
  2. 2
      index.html

2
README.md

@ -1423,7 +1423,7 @@ Bytes
```python ```python
<str> = <bytes>.decode(encoding='utf-8') <str> = <bytes>.decode(encoding='utf-8')
<int> = int.from_bytes(<bytes>, byteorder='big|little', signed=False) <int> = int.from_bytes(<bytes>, byteorder='big|little', signed=False)
<hex> = <bytes>.hex()
'<hex>' = <bytes>.hex()
``` ```
### Read Bytes from File ### Read Bytes from File

2
index.html

@ -1242,7 +1242,7 @@ db.commit()
<h3 id="decode-1">Decode</h3> <h3 id="decode-1">Decode</h3>
<pre><code class="python language-python hljs">&lt;str&gt; = &lt;bytes&gt;.decode(encoding=<span class="hljs-string">'utf-8'</span>) <pre><code class="python language-python hljs">&lt;str&gt; = &lt;bytes&gt;.decode(encoding=<span class="hljs-string">'utf-8'</span>)
&lt;int&gt; = int.from_bytes(&lt;bytes&gt;, byteorder=<span class="hljs-string">'big|little'</span>, signed=<span class="hljs-keyword">False</span>) &lt;int&gt; = int.from_bytes(&lt;bytes&gt;, byteorder=<span class="hljs-string">'big|little'</span>, signed=<span class="hljs-keyword">False</span>)
&lt;hex&gt; = &lt;bytes&gt;.hex()
<span class="hljs-string">'&lt;hex&gt;'</span> = &lt;bytes&gt;.hex()
</code></pre> </code></pre>
<h3 id="readbytesfromfile">Read Bytes from File</h3> <h3 id="readbytesfromfile">Read Bytes from File</h3>
<pre><code class="python language-python hljs"><span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">read_bytes</span><span class="hljs-params">(filename)</span>:</span> <pre><code class="python language-python hljs"><span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">read_bytes</span><span class="hljs-params">(filename)</span>:</span>

Loading…
Cancel
Save