Jed Rembold
April 8, 2026

Suppose I had created the data structure to the right in order to
keep track of class sizes over the years. How would I access the size of
my Spring 2018 Mechanics (Phys 339) class?
data[2018]['classes']['Phys339']data[1]['Phys339']data[1]['classes']['Phys339']data[2018]['Phys339']data = [
{ 'year': 2017,
'semester': 'Fall',
'classes': {
'Phys221': 38,
'Phys110': 49
}
},
{ 'year': 2018,
'semester': 'Spring',
'classes': {
'Phys339': 16,
'Phys222': 35
}
},
{ 'year': 2018,
'semester': 'Fall',
'classes': {
'CS151': 26,
'Phys110': 45
}
}
]
sanderson.json is a JSON file
containing information on books written by Brandon Sanderson.pure_sanderson.json