$ ./guess_the_languageProblem Solving — fill the blank
Problem Solving — fill the blank · easy · #255

What goes in the blank?

# read a key, defaulting when absent
value = config.____('port', 8080)

Answer: get (also accepted: get, get())

dict.get(key, default) avoids the KeyError that indexing would raise.
Play Problem Solving ▸