I am using the following code for the iteration. but if the length is high, then this will become time-consuming.
a=[11,12,3,4,5,6,15]
b=[1,3,12,15]
c=[1,2,3,4,5,6,7]
d=[]
for i in range(len(a)):
for j in range(len(b)):
if b[j]==a[i]:
d.append(c[i])
print(d)
is there any other optimal way to get this done?
thanks in advance
dictofbwill help considerably.