Getting Dictionary Values Exercise
Question 1 of 5
You have a configuration dictionary that may not have all keys. Which is the safest way to get a database timeout value with a default of 30?
config = {'host': 'localhost', 'port': 5432}config.get('timeout', 30)
config'timeout' or 30
config.default('timeout', 30)
config.timeout(30)