【发布时间】:2010-01-19 09:22:43
【问题描述】:
列表示例:
[
["url","name","date","category"]
["hello","world","2010","one category"]
["foo","bar","2010","another category"]
["asdfasdf","adfasdf","2010","one category"]
["qwer","req","2010","another category"]
]
我希望做的是创建一个字典 -> 类别:[条目列表]。
结果字典将是:
{"category" : [["url","name","date","category"]],
"one category" : [["hello","world","2010","one category"],["asdfasdf","adfasdf","2010","one category"]],
"another category" : [["foo","bar","2010","another category"], ["qwer","req","2010","another category"]]}
【问题讨论】:
标签: python list dictionary map sorting