话不多说,直接上例子:
a = {'first':'hello','second':'world'}
a.items()
dict_items([(‘first’, ‘hello’), (‘second’, ‘world’)])
type(a)
dict
type(a.items())
dict_items
for a,b in a.items():
print (a)
print (b)
first
hello
second
world