33. Type Hints and Typing
Type hints help document and check the expected types of function arguments and return values.
Example
def greet(name: str) -> str:
return "Hello " + name
Static Type Checking
Tools like mypy can check types without running code.
mypy script.py
Wrap-Up
Type hints improve readability and help catch bugs early.