Python的字典的items(), keys(), values()

>>> dict = { 1 : 2, 'a' : 'b', 'hello' : 'world' }
>>> dict.values()
['b', 2, 'world']
>>> dict.keys()
['a', 1, 'hello']
>>> dict.items()
[('a', 'b'), (1, 2), ('hello', 'world')]
>>> 

posted @ 2013-07-10 10:57  小尼人00  阅读(121)  评论(0编辑  收藏  举报