Python example: type hints

Python type hints example

Introduces annotations for function parameters, return values, local variables, class attributes, lists, and dictionaries. The examples show how typing.List and typing.Dict describe collection contents while the code still runs as normal Python.

Result

Console output

FAQ