Junior — Middle
Do you use type annotations in your code?
sobes.tech AI
Answer from AI
Yes, I use type annotations in Python to improve code readability and maintainability. They help static analyzers and IDEs detect errors before running the program. For example:
from typing import List
def greet_all(names: List[str]) -> None:
for name in names:
print(f"Hello, {name}!")
Although Python does not require the use of types, annotations make the code more understandable and facilitate teamwork.