September 2026
1051 pages
35h 4m
English
In Chapter 7, Section 7.1.1, we dealt with the notion of a data type as a blueprint for an instance. A data type thus specifies which values an instance can have. The data type of an instance can be identified via the built-in type function:
>>> x = "Hello">>> type(x)<class 'str'>
In this chapter, we want to address some basic aspects of the topic of data types before we explore the central data types of Python one by one. We have already learned about many of the basic data types in Chapter 3 and tested them in practice.
From Chapter 7, Section 7.3, you also already know the basic concept of the mutability of instances. Instances of some data types, mutable data types, can be modified. For other data types, referred ...
Read now
Unlock full access