$ ./guess_the_languageProblem Solving — fill the blank
Problem Solving — fill the blank · medium · #38

Fill the dict method that returns a default when the key is missing.

d = {}
value = d.____("k", 0)

Answer: get (also accepted: get)

dict.get(k, default) avoids a KeyError by returning default.
Play Problem Solving ▸