为什么打印出的不是按照字典里的顺序从Adam开始而是从Lisa开始?
d = { 'Adam':95, 'Lisa':85, 'Bart':59, 'Paul':75 } del d['Paul'] for key in d: print (key+':'+str(d[key]))
d = { 'Adam':95, 'Lisa':85, 'Bart':59, 'Paul':75 } del d['Paul'] for key in d: print (key+':'+str(d[key]))
2018-12-30
举报