Answer:
Step-by-step explanation:
#say the two files are converted to lists
Sociology major and Anthropology major
#Create new list
SociologyandAnthropology=[]
#loop through sociology list
for x in Sociology major:
 a=[]
 for y in Anthropology major:
 for i in range (0,no.of items,1):
 if x[i] == y[i]:
 a.append(x[i])
 else:
 a.append(x[i])
 a.append(y[i])
SociologyandAnthropology.append(a)
#sort using ID number
 z=ID number index 
SociologyandAnthropology=sorted(SociologyandAnthropology,key=lambda x:x[z]).