Total beginner question, from what I can gather I've managed to assign a string incorrectly, but I can't see where I've gone wrong. 

Any help would be appreciated, code below:

```
students = []

def add_student(name, student_id):
    student = {"name": name, "student_id": student_id}
    students.append(student)

while 1 == 1:
try:
    add_student = input("Do you wish to enter the name of a Student (Yes/No)?")
    if add_student == "Yes":
        student_name = input("Enter student name: ")
        print(student_name)
        student_id = input("Enter student ID: ")
        print(student_id)
        print(student_name + ' ' + student_id)
        add_student(student_name, student_id)
        print(student_name+' '+student_id)
        print(*students)
    elif add_student == "No":
        break
    else:
        print("Invalid answer 1")
except KeyError:
    print("Invalid answer 2")

print(*students)

```