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

Alistair Murphy
Alistair Murphy
743 Points

this is embarrassing. why is this not correct !? liar xD

go easy on me i feel really shamed about this.

lists.py
colours = [red,green,blue,yellow,pink]

3 Answers

Steven Parker
Steven Parker
230,995 Points

There's no shame in mistakes, they are part of learning and we're all here to learn.

Try putting quotes around your color names (individually, like "red", "green" ... etc.). And I see you named your variable "colours" (with a "u") but the challenge is expecting "colors" (easy mistake, you probably translate that automatically in your head without thinking about it).

Alistair Murphy
Alistair Murphy
743 Points

i'm finding that when the video is over and the challenge comes up i forgot everything, so i'm making notes but despite my notes this was wrong, i see now that in the example he gave he used numbers [1,2,3] and that you do not need "" quotes for numbers so this through me of, makes sense now. really appreciate the help on this site and the warm community thank you .

Steven Parker
Steven Parker
230,995 Points

The challenge did say "they should be colors" but it did not remind you about enclosing strings in quotes.

Please don't hesitate to ask questions if you hit another snag. And happy coding!

Could it be that you misspelled colors? Or, maybe the English version isn't recognized?

Domenic Carobine
Domenic Carobine
9,014 Points

You need to make the colors inside the lists strings. Right now the code is looking for variables named red, green, blue, yellow, and pink, but can't find anything.

colors = ["red","green","blue","yellow","pink"]