File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1423,7 +1423,7 @@ Bytes
1423
1423
``` python
1424
1424
< str > = < bytes > .decode(encoding = ' utf-8' )
1425
1425
< int > = int .from_bytes(< bytes > , byteorder = ' big|little' , signed = False )
1426
- < hex > = < bytes > .hex()
1426
+ ' <hex>' = < bytes > .hex()
1427
1427
```
1428
1428
1429
1429
### Read Bytes from File
Original file line number Diff line number Diff line change @@ -1242,7 +1242,7 @@ <h3 id="encode-1">Encode</h3>
1242
1242
< h3 id ="decode-1 "> Decode</ h3 >
1243
1243
< pre > < code class ="python language-python hljs "> <str> = <bytes>.decode(encoding=< span class ="hljs-string "> 'utf-8'</ span > )
1244
1244
<int> = int.from_bytes(<bytes>, byteorder=< span class ="hljs-string "> 'big|little'</ span > , signed=< span class ="hljs-keyword "> False</ span > )
1245
- <hex> = <bytes>.hex()
1245
+ < span class =" hljs-string " > ' <hex>' </ span > = <bytes>.hex()
1246
1246
</ code > </ pre >
1247
1247
< h3 id ="readbytesfromfile "> Read Bytes from File</ h3 >
1248
1248
< 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 >
You can’t perform that action at this time.
0 commit comments