# python 2.7
t = ({'name': 'xiaoming', 'age': '11', 'hobby': 'play'})
for i in t:
print( i ) # name | age | hobby
t_2 = (
{'name': 'xiaoming', 'age': '11', 'hobby': 'play'},
{'name': 'xiaoming', 'age': '11', 'hobby': 'play'},
)
for i in t_2:
print( i ) # dict
type(t) is tuple # False
type(t) is dict # True
慕的地6264312
相关分类