Created
October 18, 2023 06:36
-
-
Save Bhavya031/484928c814af696efafc82e080c11f36 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
students = [ | |
[12102130600101, 'Bhavya', 'CS', ['PWP','DAA','CAD'] , [80, 85, 90], [70, 75, 80], [90, 95, 100]], | |
[12102130600102, 'Dhruv', 'IT', ['PWP','DAA','CAD'] , [75, 80, 85], [65, 70, 75], [85, 90, 95]], | |
[12102130600103, 'Dhara', 'ECE', ['PWP','DAA','CAD'] , [85, 90, 95], [75, 80, 85], [95, 100, 100]], | |
[12102130600104, 'Kayur', 'ME', ['PWP','DAA','CAD'] , [70, 75, 80], [60, 65, 70], [80, 85, 90]], | |
] | |
student_dict = {} | |
for student in students: | |
enrollment_no = student[0] | |
name = student[1] | |
course = student[2] | |
subjects = student[3] | |
mid_sem_marks = student[4] | |
end_sem_marks = student[5] | |
viva_marks = student[6] | |
student_dict[enrollment_no] = { | |
'name': name, | |
'course': course, | |
'subjects': subjects, | |
'mid_sem_marks': mid_sem_marks, | |
'end_sem_marks': end_sem_marks, | |
'viva_marks': viva_marks | |
} | |
print(student_dict[12102130600101]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment