Sponsored by - Dreamcatcher IT
Venue - Premier University Chittagong
CEO, Founder of Dreamcatcher IT
Pythonista, Javascript Enthusiast, Thinker, Day Dreamer, And an introvert with exception!
name1 = "John Doe"
id1 = "1121120598"
batch1 = "21st"
department1 = "CSE"
name2 = "Bon Joe"
id2 = "1121120524"
batch2 = "22nd"
department2 = "CSE"
# ... ... ...
name43 = "Brave X"
id43 = "1121120123"
batch43 = "51st"
department43 = "CSE"
for i in range(43):
name = input()
std_id = input()
batch = input()
department = input()
# do all the stuff related to this student
# process each student in one go
std_names, std_ids, batches, depts = [], [], [], []
for i in range(43):
name = input()
std_id = input()
batch = input()
department = input()
std_names.append(name)
std_ids.append(std_id)
batfches.append(batch)
depts.append(department)
# access first student
std_names[0], std_ids[0], batches[0], depts[0]
# adding new student in middle of the list or removing student is hazardous!
students = dict()
for i in range(43):
name = input()
std_id = input()
batch = input()
department = input()
students[std_id] = [
name,
batch,
department,
]
# access student name
students['1'][0]
# access student department
students['1'][2]
students = dict()
for i in range(43):
name = input()
std_id = input()
batch = input()
department = input()
students[std_id] = {
"name": name,
"batch": batch,
"department": department
}
# access student name
students['1']['name']
# access student department
students['1']['department']
All the images and logos in this slide are collected from Internet and, used only for educational purpose.