Trying to append a dictionary in the list as an element

tyler = {
  "name": "Tyler",
  "homework": [0.0, 87.0, 75.0, 22.0],
  "quizzes": [0.0, 75.0, 78.0],
  "tests": [100.0, 100.0]
students = [lloyd,alice,tyler]

clark = {}
print students


This isn’t that I want, I want it to be like this


Is it possible to do it like that?

Actually I was trying to write a function that takes user inputs of the dictionary name and all it’s sub values and then appends it to the main student list. This isn’t in the tutorial but I’m trying to write my own extra feature, any helo would be appreciated


if you want to see names instead of dictionaries, then you want a string
alternatively a custom class where you override the string representation to show a name but otherwise behave like a dict


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.