dic = {} for _ in range(2): key = input('请输入科目:') dic[key] = {input('请输入已交作业人数:'): '已交', input('请输入未交作业人数:'): "未交"} print(dic)