Q. What does `dict.setdefault('key', default)` do?
β
Correct Answer: (B)
Returns the value if key exists; otherwise sets it to default
Explanation: `setdefault()` returns the value if the key exists; if not, it inserts the key with the default value.