What does int | None mean in a type hint (Python 3.10+)?
Correct answer
C. Either an int or None
6 views
C. Either an int or None
6 views
The | operator is a concise union syntax in type hints.
Asked in: Python Interview Advanced
https://docs.python.org/3/library/index.htmlNot sure why the answer is C? Ask here and get an explanation.