如何將鍵值對添加到字典?下面我提到了以下格式?如何將鍵值對添加到字典中?
{'1_somemessage': [[3L,
1L,
u'AAA',
1689544L,
datetime.datetime(2010, 9, 21, 22, 30),
u'gffggf'],
[3L,
1L,
u'BBB',
1689544L,
datetime.datetime(2010, 9, 21, 20, 30),
u'ffgffgfg'],
[3L,
1L,
u'CCC',
1689544L,
datetime.datetime(2010, 9, 21, 22, 30),
u'hjhjhjhj'],
[3L,
1L,
u'DDD',
1689544L,
datetime.datetime(2010, 9, 21, 21, 45),
u'jhhjjh']],
'2_somemessage': [[4L,
1L,
u'AAA',
1689544L,
datetime.datetime(2010, 9, 21, 22, 30),
u'gffggf'],
[4L,
1L,
u'BBB',
1689544L,
datetime.datetime(2010, 9, 21, 20, 30),
u'ffgffgfg'],
[4L,
1L,
u'CCC',
1689544L,
datetime.datetime(2010, 9, 21, 22, 30),
u'hjhjhjhj'],
[4L,
1L,
u'DDD',
1689544L,
datetime.datetime(2010, 9, 21, 21, 45),
u'jhhjjh']]}
可能出現[Add new keys to一個字典?](https://stackoverflow.com/questions/1024847/add-new-keys-to-a-dictionary) – 2017-12-21 03:33:26