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

add more items to your list??

why is this answer not working?

colors = "red"
colg = "green"
colb = "blue"
colr = "red"
colbl = "black"
coly = "yellow"
colp = "pink"

listo1 =[]


2 Answers

16,414 Points

The challenge is asking " 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 but I won't mark you off for that." Something like this will get it to pass:

colors = ['blue', 'green', 'red', 'yellow', 'orange']

Hi! colors should be the name of the list itself. Moreover, you don't have to add the items piece by piece, you can create a list like this: list_name = [item1, item2, item3, ...]