If I have:
d = {'a': 1, 'b': 3} e = {'a': 2, 'b': 6} f = {'a': 1, 'b': 4} How would I check that values of the 'b' key in all dictionaries is above 2 and then execute a function?
I have tried:
dicts = [d, e, f] for i in dicts: if i['b'] >= 3: func() However, this calls the function 3 times, whereas I only want to call it once all arguments are met.
i['b'] >= 3is true.