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
eren
503 PointsPython Basics > Stage 2 > List Creation
Q: "Let's practice making a list. Make a new list variable named 'colors.' Fill it with at least 5 items. They should be colors but I won't mark you off for that."
Stuck on this part... can someone please help? Thanks!
3 Answers
Isaac Hartman
6,167 PointsI am not sure what part of this task you are specifically stuck on, but your answer should look something like this:
colors = ["red", "blue", "green", "orange", "yellow"]
Jaxon Gonzales
3,562 PointsHi, Ahmed!
To create a list, all you need to do is:
list_name = ["A", "List", "Contains", "Several", "Different", "Strings"]
As you can see, a list is basically just a set of values put together in a certain order and separated by commas. And, the values can be more than just strings. They could be booleans, ints, other lists, etc..
If you are ever have a question make sure you watch the video again too!
Hope this helps!
eren
503 PointsThank you so much, guys!
I think the error I was receiving may have something to do with my placement of the commas ["red," "blue," "green," "orange," "yellow"].