3
我有一個Python中的多維字典,並且我有一個列表,其中包含我想要訪問的鍵。從字典中獲得價值的最簡單方法是什麼?Python - 「映射」到字典的鍵列表
實施例:
main = {
'one': {
'two': {
'three': "Final word"
}
}
}
mylist = ['one', 'two', 'three']
# and I want to print out the value of `three` ("Final word")