I have 2 list of elements and I am trying to do something like this:
for a in list1:
for b in list2:
if a.val == b.val:
#do xyz
Even if i use itertools product I am not sure how to then frame my if condition which needs an index from the set.
I know his is avery naive and bad way of doing which is costing my code to take up a lot of time. Can someone please help me with a faster and more efficient way of doing the same.