​I'm supposed to build a Python program that takes in a user input as a string. This program is required to add every string entered into a list until "John" is entered and then print out the list.

Essentially, this program stores all incorrectly entered strings in a list where “John” is the only correct string.

However, I'm getting the following exception:

```
Traceback (most recent call last):
  File "/home/dwayne/doen.py", line 7, in <module>
    if names_entered == "John":
NameError: name 'names_entered' is not defined`

```

This is the code I have so far:

```
name = "John"
while name != 'John':
names_entered = raw_input('Enter your name: ')

if names_entered == "John":
print []

```