title: How to create a list for each inputted item in dictionary - Python?
body: <p>I am making a student grading dictionary where the grades for each student should be stored in the dictionary created earlier under the student ID, along side the name of the student. ex. {'1234': {'Name': 'Josh', 'Scores': [88,99,77]}} I am relatively new to coding so dont know how much of my code to share, and it is probably much longer than it needs to be right now.</p>
  
  <pre><code>myDict = {}
  total_scores=[]
  all_names=[]
  total_student_id=[]
  for key in total_student_id: 
      for value in all_names: 
          myDict[key] = value 
          all_names.remove(value) 
          break 
  for key in all_names: 
      for value in total_scores: 
          myDict[key] = value2 
          total_scores.remove(value2) 
          break 
  
  new_student=True 
  more_grades = False
  while new_student:
      name = input("What is their name?")
      all_names.append(name)
      student_id = input("What is their student id?")
      total_student_id.append(student_id)
      repeat1 = input("Are there any more students? yes or no: ")
      if repeat1 == "no": 
          new_student = False
          more_grades = True
      else:
          new_student = True
  while more_grades == True:
      assignments = int(input("How many assignments were given: "))
      assign_number = 0
      while assign_number &lt; assignments: 
          score = int(input("enter one of your assignment scores: "))
          total_scores.append(score)
          assign_number = assign_number+1
          more_grades = False
          continue
  for key, value in myDict.items():
      print(key, ' : ', value, value2)
  </code></pre>
  
  <p>Currently, this code is set up to take the input for each student, and their id. It also asks for the number of assignments given along with the grades for each assignment, however it does not ask for the grades of each specific student. I want to switch this code to ask each student individually for their grades, and add it to the dictionary, to get an output similar to the one i mentioned above.
  Edit: I am also having the problem of it not printing out any results at the end. Originally, it was printing out the student id and name, but once I started implementing the assignments/scores, the code would end once I added the final score.</p>
  
  <p>Current Output:</p>
  
  <pre><code>What is their name?Andrew
  What is their student id?101
  Are there any more students? yes or no: yes
  What is their name?Dani
  What is their student id?102
  Are there any more students? yes or no: yes
  What is their name?George
  What is their student id?103
  Are there any more students? yes or no: no
  How many assignments were given: 3
  enter one of your assignment scores: 22
  enter one of your assignment scores: 88
  enter one of your assignment scores: 55
  </code></pre>
  
  <p>Expected Output:</p>
  
  <pre><code>Please enter the student's name: Andrew
  Please enter the student's ID: 101
  Enter another student? (y)es (n)o: y
  Please enter the student's name: Dani
  Please enter the student's ID: 102
  Enter another student? (y)es (n)o: n
  How many assignments were given? 3
  
  Please enter the scores for Andrew
  Enter score (0-100) for assignment 1: 90
  Enter score (0-100) for assignment 2: 88
  Enter score (0-100) for assignment 3: 95
  
  Please enter the scores for Dani
  Enter score (0-100) for assignment 1: 56
  Enter score (0-100) for assignment 2: 70
  Enter score (0-100) for assignment 3: 85
  
  Final grade report:
  Andrew's average score was 91.0
  Dani's average score was 70.3
  
  Assignment averages:
  The average for assignment 1 was 73.0
  The average for assignment 2 was 79.0
  The average for assignment 3 was 90.0
  </code></pre>