Python 字典dictionaries 输出

15.iterating over dictionaries
print out all the items in the dictionary -that is,each key and each value
这是第一节就学过,复习第一节
syntax:
print d.items()

2.keys() and values()

syntax:
print d.keys()
print d.values()

3.the"in" operater

syntax:
for key in d:
print key,d[key],
for letter in "Eric":
print letters,

你可能感兴趣的:(Python 字典dictionaries 输出)