Is this common practice to avoid key not found in a dictionary
value = my_dic.get(100, 0)
If you need the "default value" everywhere, consider defaultdict as a possible alternative. (A factory/callback approach offers a good bit of flexibility with the "default value".)
Happy coding.