我使用的是python2.7.4。我尝试比较python中两个不同字典的值,并根据比较结果构建一个新字典。 我的用户将post positions以及马的mlodds1和tbodds1输入到3个列表中,然后我执行以下操作:
ml_dict = dict(zip(postpositions,mlodds1))
tb_dict = dict(zip(postpositions,tbodds1))
从这些列表中构造两个词典。
我想要一个新字典:screened_dict[a,x]
由tb\u dict[a,x]和ml\u dict(a,y)中的值x<;y组成。提前谢谢。你知道吗
相关问题 更多 >
编程相关推荐