OnlinePython

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}