📜  python 如何从字典中获取数据 - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:24.009000             🧑  作者: Mango

代码示例1
teas = {
    'english_breakfast': 104,
    'matcha_green_tea': 26,
    'green_tea': 29,
    'decaf_english_breakfast': 51,
    'assam': 48
}

matcha = teas.get('matcha_green_tea')

print(matcha)