One of the 50 questions in this topic
How much do you know about Python?Type annotations (introduced in Python 3.5+) are optional prompts that suggest expected types for variables, parameters, and return values. For example: def sum(a: int, b: int) -> int:. They don't affect execution or force types (Python is still dynamically typed), but tools like mypy can check them statically. They improve documentation, facilitate autocompletion in IDEs, and help detect errors before execution.