📅  最后修改于: 2022-03-11 14:45:19.597000             🧑  作者: Mango
# get vs [] for retrieving elements
my_dict = {'name': 'Jack', 'age': 26}
# Output: Jack
print(my_dict['name'])
# Output: 26
print(my_dict.get('age'))