我有一個問題,從包含其他幾個字典的字典中獲取某些值。它看起來像這樣:如何從1個字典中的幾個字典中檢索某個鍵的值?
dictionary = {
'1532': {'text': 'Hello World, nice day huh?',
'user': 'some_name',
'word_list': ['Hello', 'World', 'nice', 'day', 'huh']},
'4952': {'text': "It's a beautiful day",
'user': 'some_name',
'word_list': ["It's", 'a', 'beautiful', 'day']},
'7125': {'text': 'I have a problem',
'user': 'some_name',
'word_list': ['I', 'have', 'a', 'problem']}}
我想要做的是遍歷字典,並在每次迭代只檢索「WORD_LIST」的值。
謝謝你的幫助! – PeetZ