I have a list of dictionaries like so:
[{\'price\': 99, \'barcode\': \'2342355\'}, {\'price\': 88, \'barcode\': \'2345566\'}]
I want to fin
One answer would be mapping your dicts to the value of interest inside a generator expression, and then applying the built-ins min and max.
min
max
myMax = max(d['price'] for d in myList) myMin = min(d['price'] for d in myList)