Python Python Basics (2015) Python Data Types List Creation

Thomas Caniff
PRO
Thomas Caniff
Pro Student 1,258 Points

Let's practice making a list. Make a new variable named colors. Assign it to a list of at least 5 items. They should be

colors= [red,blue,yellow,green,violet] and the machine says that red is not defined...please help

lists.py

2 Answers

Thomas Caniff
PRO
Thomas Caniff
Pro Student 1,258 Points

Yeah I figured it out last nite but thank you very much for answering as fast as you did..

Jason Anders
MOD
Jason Anders
Treehouse Moderator 143,830 Points

Hey Thomas,

Right now, Python thinks you are trying to pass in variables (which is why your are getting the "not defined" error). If you want a list of strings (the color names), remember... strings need to be enclosed in quotation marks. :)

:dizzy: