June 2019
Beginner to intermediate
770 pages
19h 24m
English
Python 3 allows us to provide extensive type hints for describing the contents of a collection. This has two benefits:
The non-collection types (int, str, float, complex, and so on) all use the type name as their type hint. The built-in collections all have parallel type definitions in the typing module. It's common to see from typing import List, Tuple, Dict, Set to import these type names into a module.
Each of the type hints accepts parameters to further narrow the definition:
Read now
Unlock full access