Google Code Prettify - 輕量級的語法上色工具

星期三, 3月 13, 2019

Python字典 結合LIST應用

max_points = [25,25,50,25,100]
assignments = ['ch 1','ch 2','quiz','ch 3','test']
students = {'#Max':max_points}

students['A']= [0]*len(max_points)
students['A'][2]=100
students['B']= [0]*5
students['C']= [2]*10
students['name']= [5]

students.keys()
students['#Max']
students['A']
students['B']
students['C']
students['name']