I am trying to make a list variable. This is my code colors = [brown, blue, yellow, purple, red]. It gives me name error
It says brown is not defined
colors = [brown, blue, yellow, purple, red]
Jason AndersTreehouse Moderator 143,922 Points
You are on the right track , but are missing something vital. Right now, the compiler is looking for variables with the names you have in the list. This is because there are no quotation marks around the words. Without quotation marks, the compiler thinks they are variable names and that is why you are getting the "not defined" error.
If you enclose each word in quotation marks, then that makes them
I'm sure you'll pass it now.
Keep Coding! :)