Skip to content

Commit 72edaac

Browse files
committed
Bytes
1 parent 668fdbd commit 72edaac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -869,14 +869,14 @@ Bytes
869869
**Bytes object is immutable sequence of single bytes. Mutable version is called bytearray.**
870870

871871
```python
872+
<bytes> = b'<str>'
872873
<int> = <bytes>[<index>]
873874
<bytes> = <bytes>[<slice>]
874875
<bytes> = b''.join(<coll_of_bytes>)
875876
```
876877

877878
### Encode
878879
```python
879-
<bytes> = b'<str>'
880880
<bytes> = <str>.encode(encoding='utf-8')
881881
<bytes> = <int>.to_bytes(length, byteorder='big|little', signed=False)
882882
<bytes> = bytes.fromhex(<hex>)

0 commit comments

Comments
 (0)