With lists of dictionaries such as the following:
user_course_score = [
{\'course_id\': 1456, \'score\': 56},
{\'course_id\': 316, \'score\': 71}
]
dictionary is basically a list of (key, value) pairs.
in your case,
user_course_score can just be a dictionary of (course_id, score) rather than a list of dictionaries (you are just complicating it unnecessarily)
similarly, course can just be a dictionary of (course_id, name)
what you have suggested in the end is the right way :)