September 2026
1051 pages
35h 4m
English
This section describes the handling of strings in Python and, in particular, the properties of the str, bytes, and bytearray data types provided for this.
As you have already learned, strings are sequences of characters. This means that all operations for sequential types are available to them.[ 52 ]
The characters an instance of the str data type can store are letters, punctuation, spaces, German umlauts, and other special characters. In contrast, the bytes and bytearray data types are intended for storing binary data. For this reason, instances of the bytes and bytearray data types consist of a sequence of individual bytes—that is, integers from 0 to 255.
For the time being, we’ll deal only with str
Read now
Unlock full access