for example:
>> a = list(["red", "blue", "red"]);
>> b = list(["yellow", "red"]);
result of array_diff:
>> list("blue")
or best way to do this?
for example:
>> a = list(["red", "blue", "red"]);
>> b = list(["yellow", "red"]);
result of array_diff:
>> list("blue")
or best way to do this?
convert them to a set and do a set substraction
>>> a = ["red", "blue", "red"]
>>> b = ["yellow", "red"]
>>> set(a) - set(b)
{'blue'}
>>> a
['red', 'blue', 'red'] # the lists are still the same