Question: I have a MS Excel list with only 5 values in column A. There will always be one random duplicated value within this list. For example:

A1:A5
Heart
Finger
Hair
Heart
Nose

Here Heart is listed twice. I need a formula that detects the value that occurs twice in the list, and type this formula into colum B1:B3 to create a new list. The outcome of the new list should be the remaining three values - hence should not include Heart since it occurs twice.

Another example with preferred outcome...

A1:A5 Heart, Nose, Hair, Finger, Finger

B1:B3 Heart, Nose, Hair

In this example Finger is listed twice (in colum A) and therefore excluded in colum B (the new list). 

Would really appreciate all hjelp and adwice with respect to how this could be solved with a formula in Excel.

Answer: 
You need to define a new dictionary object each time in loop or else you end up using the same dictionary object so in effect replaces the already added one.

```
while stop != 'q':
    grocery_item = {}
    # ...

```
You can use `map` and `sum` to get grand\_total

```py
grocery_history = []
stop = 'go'

while stop != 'q':
    grocery_item = {}

    grocery_item['name'] = input("Item name:\n")
    grocery_item['number'] = int(input("Quantity purchased:\n"))
    grocery_item['price'] = float(input("Price per item:\n"))

    grocery_history.append(grocery_item)

    stop = input("Would you like to enter another item?\nType 'c' for continue or 'q' to quit:\n")

grand_total = sum(map(lambda item: item['number'] * item['price'], grocery_history))

print("Grand total: $%.2f" % grand_total)
print(grocery_history)

```

**Input:**

```
Item name:
item
Quantity purchased:
2
Price per item:
1.2
Would you like to enter another item?
Type 'c' for continue or 'q' to quit:
q

```

**Output:**

```
Grand total: $2.40
[{'name': 'item', 'number': 2, 'price': 1.2}]

```