For example, if a dictionary is defined pythonDict = {a: 1, b: 2}
and it is referenced pythonDict["c"]
or pythonDict["d"]
, can the dictionary be defined a default value for any key that isn't listed, without listing all the possibilities?
I'd like to have a reference in one line without an additional "if" statement to check if the key is included.