I am trying to add elements in a list in order to identify the max float of that list. But it only appends the latest element.
mylist= [[coffee, 1, 3], [milk,2,5], [butter, 6,4]]
for items in mylist:
value = float(items[2]) * (float(items[1]))
values = []
values.append(value)
Fixed thanks to @programandoconro by simply putting my values = [] outside the loop as I was resetting the list at every iteration.