我有这样的清单
mylist = [student_number , student_age , student_marks , subject_name , subject_marks, subject_date , ass_name , ass_number]
我想要类似的东西
list_student = [student_number , student_age , student_marks]
list_subject = [subject_name , subject_marks, subject_date]
list_ass = [ass_name , ass_number]
以便它与下划线之前的文本匹配,将其作为字典的键
我想将其转换为字典,以便我可以访问类似
for a AllList['student']:
Student stuff
编辑:列表元素可以按任何顺序排列