Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Python Python Basics (2015) Python Data Types List Creation

Aryan Bhatia
Aryan Bhatia
1,601 Points

List creation (coding Challenge) Add more Items !

I have written my code just like it should be but it keeps saying Bummer! Add more items

lists.py
colors = ["red, blue, black, yellow, pink, green, white, purple"]

4 Answers

Duy Pham
PLUS
Duy Pham
Courses Plus Student 44,614 Points

The problem is asking for 5 items in a list called colors. What you have in your code right now is one item as type String. To correct this, you have to put the end double quote for each of the colors you represent in the list, like this:

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

By this way, now you will have 5 items in a list as type String. Hope that makes sense!!!!Good luck

Aryan Bhatia
Aryan Bhatia
1,601 Points

Thanks A lot I completely forgot

Moosa Bonomali
Moosa Bonomali
6,297 Points

Each color should be a separate string, separated by a comma. The way you have written a list is a array with a single entry. "red, blue, black, yellow, pink, green, white, purple"

So rather it should look like this;

colors = ["red", "blue", "black", "yellow", "pink", "green", "white", "purple"]
Aryan Bhatia
Aryan Bhatia
1,601 Points

Thanks a lot, very helpful

Miranda Shipley Gonzales
Miranda Shipley Gonzales
222 Points

Thank you! I asked a similar question during this challenge. I also found, I could answer the question by entering numbers inside square brackets without quotes, and still pass. Weird.