The reason that your code didn't work is because your new student dictionary isn't defined as a list; therefore, you can't append.
There are couple ways of doing this but keeping it the same logic as you have now, you'll need to add a few extra steps.
>>> students = {'James': [70, 75, 95], 'Adams': [75, 90, 73], 'Benjamin': [80, 79, 85]}
>>> def add_student ():
... new_student = input ('Enter student name to be added:' )
... grades = input ('Enter new student\'s grade: ')
... grades = grades.split (',') # Split grades by comma
... grades = [int (grade.strip (' ')) for grade in grades] # Strip space between each grade & convert to integers
... students [new_student] = grades # Assign new student with grades
...
>>> add_student()
Enter student name to be added:>? John
Enter new student's grade: >? 82, 79, 77
>>> students
{'Benjamin': [80, 79, 85], 'Adams': [75, 90, 73], 'James': [70, 75, 95], 'John': [82, 79, 77]}
Updating answer based on comments
To remove the students score, you'll need ensure that the name as well as the score exists in database.
>>> def remove_scores():
... name = input('Enter student name whose scores would be removed: ')
... score = int (input('Enter score to be removed: '))
... # Checking both student name and score exists in database
... if name in students and score in students [name]:
... score_index = students [name].index (score) # Obtain the index location of the score
... del students [name][score_index]
... print (students)
... else:
... print('Student %s and/or %s score is not in our database.' % (name, score))
...
First, let's add one extra score '79' to Adams to be deleted.
>>> students ['Adams'].append (79)
>>> students
{'Benjamin': [80, 79, 85], 'Adams': [75, 90, 73, 79], 'James': [70, 75, 97]}
Next, test the name and score condition.
>>> remove_scores()
Enter student name whose scores would be removed: >? Larry
Enter score to be removed: >? 59
Student Larry and/or 59 score is not in our database.
>>> remove_scores()
Enter student name whose scores would be removed: >? Adams
Enter score to be removed: >? 77
Student Adams and/or 77 score is not in our database.
Once we're happy with the result, let's delete and see the results.
>>> remove_scores()
Enter student name whose scores would be removed: >? Adams
Enter score to be removed: >? 79
{'Benjamin': [80, 79, 85], 'Adams': [75, 90, 73], 'James': [70, 75, 97]}