I have two array as follows:
a=['history','math','history','sport','math']
b=['literature','math','history','history','math']
I zipped two arrays and used dictionary to see if key and values are equal print me them but the dictionary did not print the cases which are repeated, it print only one one them and i need all of them because I need the number of time they are repeated.
My code:
combined_dict={}
for k , v in zip(a,b):
combined_dict[k]=v
print(combined_dict)