Python Python Basics (2015) Python Data Types List Creation

python basics list says add more items

I'm trying to complete the challenge task 1 of 1 in the lists section of Python basics series. in that challenge it asks "Practice making a list, create a variable named colors and assign 5 colors to it" im entering colors= ["black, red, green, orange, blue"] and it keeps saying "add more items"

lists.py
colors = ['blue, red, orange, green, purple']

1 Answer

The problem is where you have opened and closed the quotes .According to the complier you have a list which has only one string .You gotta do it like

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

that makes sense, but i'm trying to do it exactly was instructed in the video. in the video, Kenneth creates a list as my_list = [1, 2, 3] why is this different?? Thank you for answering Vidhya!

Strings have to be enclosed within quotes Martin. 1,2,3 are integers so quotes are not nessasary ,but colors are strings so quotes become mandatory .

that explains it all! sorry for the elementary question, still very new. I appreciate your quick response very much. Have a great New Year!