Which method returns the default value without inserting a new key?

  1. get()
  2. setdefault()
  3. pop()
  4. None of these
Correct answer get()

Explanation

`get()` only retrieves the value or default without modifying the dictionary.

Update: Admin added a tag on this question

Topics

By Admin · · 215 views