I have a list of dictionaries
lst = [ {'x': 1, 'y': 2}, {'x': 1, 'y': 3 }, {'x': 2, 'y': 2 } ]
Dictionaries always have the same keys and it is the values that change at all times.
Then I would like to add the value of the keys "and" when the key "x" has the same value.
The output would have to give: lst # [{'x': 1, 'y': 5 }, {'x': 2, 'y': 2 }].