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

List issues for challenge

Ok, the earlier challenges, I got through them with no problems, now, I watch the videos and I'm not passing the videos. I read through the teachers notes and still no clues as to what I'm missing. So, the task is to make a list of five colors with a list name of colors. The error that comes back is that blue is not defined and so on (as you remove colors). So, I tried putting str in front of the brackets, nope didn't do the trick. The I tried placing quotations at the beginning and end of the colors list, within the brackets; this was a no go as well. In the video he strictly deals with integers in his lists. So, since now they are asking us to create a list with five colors are we supposed to type it differently?

lists.py
Colors=[blue, black, red, orange, yellow]

3 Answers

Steven Parker
Steven Parker
231,271 Points

Your colors are actually color names (strings) and so each one should be enclosed in quotes.

Also, the instructions said to make a variable named "colors" (with a lower-case "c"), but you wrote "Colors" (with a capital "C"). Since Python is case-sensitive, these identifiers reference two different things.

You have put quotations surrounding each value. Also, you have to name your list colors instead of Colors. Hope this helps!

Oh my goodness, I didn't even notice that I had done that, thank you, both of you! Gosh I suck at this.