Multiple ChoiceIntermediate 30s
__enter__ and __exit__
Choose the best answer for: context manager protocol
Options
- 1__exit__ is called before entering the managed block
- 2They are only for files and never for other resources
- 3__enter__ is called entering with, __exit__ on exit
- 4__enter__ is optional and may be omitted by classes
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.