I am new to Python, so I welcome alternative approaches.
I have a list of dictionaries that I start with (read from file). Now I have a set of additional dictionaries that I would like to add to this list, but only if they are not in the original list.
However, I require that "not in the source list" is determined by the user matching function, and not by what Python uses by default.
In particular, I want to compare specific key / value pairs in a dictionary, and if they are the same, return the expression βtrueβ for the expression.
myList = ReadFromFile... newList = ReadFromFile... for item in newList: if item not in myList:
source share