A Admin • 825.56K Points Coach Q. What does `dict.setdefault('key', default)` do? (A) Sets a new key only if it exists (B) Returns the value if key exists; otherwise sets it to default (C) Raises an error if key doesn’t exist (D) Deletes the key Correct Answer - Option(B) Views: 5 Filed under category Python Hashtags: Python Dictionary Share Manage Tags
Discusssion
Login to discuss.