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 = {}
    # ...

```
sample code should work

```

grocery_history = []
stop = 'go'

while stop != 'q':
    item_name = input("Item name:\n")
    quantity = int(input("Quantity purchased:\n"))
    cost = float(input("Price per item:\n"))

    grocery_item = {}
    grocery_item['name'] = item_name
    grocery_item['number'] = quantity
    grocery_item['price'] = cost

    grocery_history.append(grocery_item)

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

grand_total = 0

for grocery_item in range(0, len(grocery_history)):

  item_total = grocery_history[grocery_item]['number'] * grocery_history[grocery_item]['price']
  grand_total += item_total

  print(str(grocery_history[grocery_item]['number']) + " " + grocery_history[grocery_item]['name'] + " @ $%.2f" % grocery_history[grocery_item]['price'] + " ea \t$%.2f" % item_total)

  item_total = 0.0

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

```

the problem happened because you are repeating using same dict, although it adds to list each time, what you actually doing is keep updating the same reference so all content in the list becomes the same value
move dict inside solve the problem