📅  最后修改于: 2022-03-11 14:46:20.540000             🧑  作者: Mango
def createStudent(name, age, grades=None):
if grades is None:
grades = []
return {
'name': name,
'age': age,
'grades': grades
}
def addGrade(student, grade):
student['grades'].append(grade)
# To help visualize the grades we have added a print statement
print(student['grades'])