Hi,
I have two dictionaries and what I would like to do is to search if an item from dict1 is present at least 3 times in dict2. If so, do something.
At the moment, I have something like this
for line2 in list2:
to_find=line2[3]+line2[4]
if to_find in dic1:
new_string=((" ".join(line2[:-1]+[dic1[to_find]])).replace("n/a ","")).split(" ")
But the above does not count the occurrences of "to_find" in dic1. I found also here some other articles suggesting the creation of a counter that increases on each match found, but I find it quite complicated to manage.
Is there any solution that you can share?
Thanks