當前位置:成語大全網 - 新華字典 - python使用字典存儲學生的成績

python使用字典存儲學生的成績

student_id_list = [1, 2, 3, 4, 5....] # 學生id列表,可以是學號

score_list = [90, 91, 92, ...] # 對應的成績列表

result = dict(zip(student_id_list, score_list)) # result就是妳想要的字典