Dictionary_exercise
unknown
plain_text
4 years ago
484 B
11
Indexable
grades = {
"Roxanne": (4, 5, 6, 6, 7),
"Forsythe": (4, 5, 7, 8, 9)
}
PatientFiles = {
"adsfh": {"Name": "Mary", "Age": 34, "Condition": "Allergies", "sex": "F"},
"asdf": {"Name": "Chris", "Age": 55, "Condition": "Heart clog", "sex": "M"},
"adff": {"Name": "Carry", "Age": 94, "Condition": "Old", "sex": "F"}
}
for ID, dictionary in PatientFiles.items():
print("ID", ID)
for key,value in PatientFiles.items():
print(key, PatientFiles[key])Editor is loading...