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

Andrew Flack
Andrew Flack
186 Points

How do I rename a list

The list example is saying to make a list of colors and when I do it returns red undefined.

lists.py
my_list = [ green, blue, red, purple, pink]

1 Answer

Hi Andrew,

Couple things here:

  1. The challenge is asking you to make a list named colors, but it seems your list is named my_list.
  2. You're need to add green, blue, red, purple, pink as strings; otherwise, your program won't know what is in the list!