Complex types
- For Python 3.9+
examples/python-types-at-pyweb-2025-01/complex_types.py
things: list = ["snake", 42] #things: list[str] = ["snake", 42] numbers: list[int] = [23, 19, 42] mapping: dict[str, int] = { "Perl": 4, "Python": 6, "Rust": 4, "PHP": 3 } info: tuple[str, int, bool] = ("Python", 3, True)