Trying to figure out what to change to get this to work. I want to print out the value of 'homework' Thanks!
dic1 = dict(tyler = {
"name": "Tyler",
"homework": [0.0, 87.0, 75.0, 22.0],
"quizzes": [0.0, 75.0, 78.0],
"tests": [100.0, 100.0]
})
number = ['0','1','2']
def foo(dict_search):
for key, value in dict_search.items() :
if key == "homework":
print ('homework',value)
#dict_search[:] = dic1 # swap the slice around here
foo(dic1)