Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Python Basics (2015) Python Data Types List Creation

Thomas Caniff
PLUS
Thomas Caniff
Courses Plus 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
PLUS
Thomas Caniff
Courses Plus 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 145,860 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: