I'm trying to add a third value to existing dictionary keys in Python. I'm sure this is probably easy, but I'm fairly new to coding so each way I've tried has thrown an error. Below is an example of what I tried which resulted in a syntax error. I also tried making the colon an equal sign but I got the message can't assign to a literal
which I figure is due to the presence of two different =
in the same line of code.
student = [
{ "name": "Kellie", "student_id": 12345},
{ "name": "James", "student_id": 39875},
{ "name": "Katie", "student_id": 24680},
]
student[0] = "lastName" : "Vee"
student[1] = "lastName" : "Tee"
student[2] = "lastName" : "Zee"