Generics
Generics are parametrized types. Python has several built-in:
a: list[int] = [1, 2, 3]
b: tuple[int, int, int] = (1, 2, 3)
c: tuple[int, ...] = (1, 2, 3)
d: dict[str, int] = {"one": 1, "two": 2}
Lists have a single parameter, the type the list holds. Tuples either take one parameter each, or have a ...
. And dicts take one for the key and one for the value.