d = {
'Adam': 95,
'Lisa': 85,
'Bart': 59
}
for key in d :
print key +': '+ bytes(d[key])
'Adam': 95,
'Lisa': 85,
'Bart': 59
}
for key in d :
print key +': '+ bytes(d[key])
2020-02-26
d={'Adam':95,'Lisa':85,'Bart':59}
for dic in ['Adam','Lisa','Bart']:
print (dic+': '+bytes(d.get(dic)))
for dic in ['Adam','Lisa','Bart']:
print (dic+': '+bytes(d.get(dic)))
2020-02-26
ten = 0
bit = 0
while ten < 10:
ten +=1
bit = 0
while bit < 10 :
if ten < bit :
print ten * 10 + bit
bit += 1
bit = 0
while ten < 10:
ten +=1
bit = 0
while bit < 10 :
if ten < bit :
print ten * 10 + bit
bit += 1
2020-02-26
最新回答 / 慕瓜4039511
方法调用出错,应该是
generate_tr(name, score)而不是
[(name,score) for name, score in d.items()]
2020-02-25