- The Python Apprentice
- Robert Smallshire Austin Bingham
- 58字
- 2025-04-04 19:04:57
The bytes type – an immutable sequence of bytes
The bytes type is similar to the str type, except that rather than each instance being a sequence of Unicode code points, each instance is a sequence of, well, bytes. As such, bytes objects are used for raw binary data and fixed-width, single-byte character encodings, such as ASCII.