python 使用两个列表合成字典

 

keys = ['red', 'green', 'blue']  
values = ['#FF0000','#008000', '#0000FF']  
color_dictionary = dict(zip(keys, values))  
print(color_dictionary)

 

posted @ 2018-11-19 10:27  anobscureretreat  阅读(700)  评论(0)    收藏  举报