Junior — Middle
Do you use type annotations in your code?
sobes.tech AI
Answer from AI
Yes, I use type annotations in Python, especially in projects where readability and maintainability of code are important. Annotations help static analyzers (like mypy) check type correctness, reducing errors.
Example of using annotations:
def greet(name: str) -> str:
return f"Hello, {name}!"
age: int = 30
Although Python is a dynamic language, annotations do not affect execution but serve as documentation and a development tool.