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

```
This is because your loop does not create a new `grocery_item` object each time; it just updates the *same* `grocery_item` object over and over.

`grocery_history` ends up containing multiple *references* to this single object, in its latest state.

To fix this issue, move the line `grocery_item = {}` to be the first item underneath the `while stop != 'q':` loop. This will create a *new* object each time through the loop.