Multiple ChoiceIntermediate 30s
typing.Literal
Choose the best answer for: Literal type
Options
- 1Literal only works with int values and rejects str
- 2Literal is an alias of str and adds no checking
- 3Literal['a', 'b'] restricts to specific values
- 4Literal is used to declare string literal annotations
Think you can answer under pressure?
Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.