from collections imort OrderedDict
d = OrderedDict()
d[‘aa‘] = (1, 30)
d[‘bb‘] = (2, 31)
d[‘cc‘] = (3, 32)
验证:
for k in d:
print(k)
输出:aa bb cc(按输入时的顺序输出)
原文地址:https://www.cnblogs.com/volcao/p/8727992.html
时间: 2024-10-31 02:24:34
from collections imort OrderedDict
d = OrderedDict()
d[‘aa‘] = (1, 30)
d[‘bb‘] = (2, 31)
d[‘cc‘] = (3, 32)
验证:
for k in d:
print(k)
输出:aa bb cc(按输入时的顺序输出)
原文地址:https://www.cnblogs.com/volcao/p/8727992.html