# get value of given key hh = {"a":1, "b":2} print(hh.get("b")) # 2 print(hh.get("x")) # None print(hh.get("x", 8)) # 8