How add type annotation?
- We already saw the two examples:
- Add type annotation to variables.
- Add type annotation to the function signature.
examples/python-types-at-pyweb-2025-01/type_annotation.py
def add(x: int, y: int) -> int: return x + y def multiply(x, y): res: int = x * y return res a: int = 23 z: int = add(a, 19) result = multiply(a, 19)