title: How do I properly add to a dict from user input and print the dict with a for loop?
body: <p>I have been trying for some time now to take user input and add it to an existing dictionary. Then print the dictionary keys and values with a for loop but I can't figure out the proper way to do this. </p>
  
  <p>After research I am almost certain I am not adding the user inputted values to the dict correctly and when the code is run i get an error stating that 'set' is subscriptable. How should I add the user data to the dict and also print it properly?</p>
  
  <pre><code># Authorized Users
  authorized_users = ["Jim","Mary","Claire","Hector","Ren"]
  
  # Student Dictionary
  students ={
      "Alice":{"id": "1", "age":26, "grade":"A"},
      "Bob":{"id": "2", "age":34, "grade":"C"},
      "Jimbo":{"id": "3", "age":12, "grade":"B"},
      "Karen":{"id": "4", "age":33, "grade":"D"},
      "Keith":{"id": "5", "age":53, "grade":"F"}
      }
  
  
  while True:
      login = input("Please login with an authorized user: ").strip().title()
  
      if login in authorized_users:
          print("\nWelcome back "+login+", please choose an option from the menu!")
  
          print(
              '''
              1.) View Student List
              2.) View Authorized Users
              3.) Add student
              4.) Remove Student
              5.) Exit program
              '''
               )
  
          authorized_input = int(input("Select an option from the list above to proceed.: "))
  
          if authorized_input == 1:
              print("\n*** ACTIVE STUDENTS ***")
              for student_id, student_info in students.items():
                  print("\nName:", student_id)
                  for key in student_info:
                      print(key + ':', student_info[key])      
              print("\n")
  
  
          elif authorized_input == 2:
              print("\n*** AUTHORIZED USERS ***")
              for x in range(len(authorized_users)):
                  print(authorized_users[x])
  
              print("\n")
  
          elif authorized_input == 3:
              print("Please fill in the new students information")
  
              student_name = input("Enter the student's name: ")
              student_id = input("Enter the student's ID: ")
              student_age = input("Enter the student's age: ")
              student_grade = input("Enter the student's grade: ")
  
              # Add data to dict students
              students[student_name] = {student_id, student_age, student_grade}
  
              for student_id, student_info in students.items():
                  print("\nName:", student_id)
                  for key in student_info:
                      print(key + ':', student_info[key])  
              print("\n")
  
  
          elif authorized_input == 4:
              print("option 4")
  
          elif authorized_input == 5:
              quit()
  
      else:
          print("access denied")
  </code></pre>