Python Python Basics (2015) Python Data Types List Creation

lists, whats wrong?

can someone help ?

lists.py
colors = [yellow, green, black, purple, marron]

1 Answer

Krahr Chaudhury
PRO
Krahr Chaudhury
Pro Student 139 Points

Because the contents of your list are not enclosed in quotation marks, they are being treated as variables, but they are unassigned! If you want them to be strings, then enclose each word in quotation marks (unless you want them to be variables, then you'd have to define each of them individually).