[python]Dictionary

A dictionary contains 1 to 1 mapping.

dict = {"key1":"value1", "key2":"value2"}

then we can simply refer the key to call corresponding value

var = dict["key1"]

 

posted @ 2016-06-05 11:53  Symmetry  阅读(158)  评论(0)    收藏  举报