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 trialLouigi Richardson
Courses Plus Student 3,448 Pointsadd 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 =[]
listo1.append(colg)
listo1.append(colb)
listo1.append(colr)
listo1.append(colbl)
listo1.append(coly)
listo1.append(colp)
listo1.append(colors)
2 Answers
bryonlarrance
16,414 PointsThe 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']
gyorgyandorka
13,811 PointsHi! 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, ...]