Multiple ChoiceBeginner 30s
hasattr builtin
Choose the best answer for: hasattr()
Options
- 1hasattr sets an attribute on the object if it is missing
- 2hasattr is a dict method for looking up stored keys
- 3hasattr deletes attributes that are no longer needed
- 4hasattr(obj, 'attr') checks if attribute exists
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.