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
158,747 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
158,747 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
8,891 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"]