def make_scores_dict(names, scores):
for i in range(len(names)):
scores_dict[names[i]] = scores[i]
return scores_dict
names=['Joe', 'Tom', 'Bob', 'Emily', 'Sue']
scores=[10, 23, 13, 18, 12]
dict = make_scores_dict(names, scores)
print #How do I print out a specific name? This is where I'm stuck at
本质上,我需要获取 2 个列表并制作带有键/值的字典。我被困在如何打印出指定的名称上。例如,如果我想打印出 Emily 和她的值,我该怎么做?