Hello everyone, I am trying to create a list of students:
first_name = [] source_name = [] dict1 = {} n = input("How many new students: ") for i in range(0, n): name = raw_input("Enter first name: ") s_n = raw_input("Enter second name: ") first_name.extend([name]) source_name.extend([s_n]) dict1['name'] = first_name dict1['source_name'] = source_name print dict1 But for some reason, when I add more than one student, I only get the last student I added. Why?
print dict1- andreymal