我想在name_input为空时追加一个空列表作为值,并且对于字典为grade_input为空,其字符为name_input.以下是代码段.但它似乎没有用.有什么建议?
if (name_input != '' and grade_input ==''): name_dic[name_input].append([])
python dictionary list
dictionary ×1
list ×1
python ×1