pairs = {1: "apple", "orange": [2, 3, 4], True: False, None: "True", } print(pairs.get("orange")) print(pairs.get(7)) print(pairs.get(12345, "不在字典中")
>>> [2, 3, 4] None 不在字典中 >>>
0