I want to append an empty list as the value when the name_input is not empty and grade_input is empty to a dictionary, whose keys are the name_input. The following is the code snippet. But it doesn't seem to work. Any suggestions?
if (name_input != '' and grade_input ==''):
name_dic[name_input].append([])