Skip to content

Instantly share code, notes, and snippets.

@Bhavya031
Created October 18, 2023 06:36
Show Gist options
  • Save Bhavya031/484928c814af696efafc82e080c11f36 to your computer and use it in GitHub Desktop.
Save Bhavya031/484928c814af696efafc82e080c11f36 to your computer and use it in GitHub Desktop.
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