Python Python Basics (2015) Python Data Types List Creation

I don't know why my answer is wrong ? colors = [yellow, red, white] colors + [blue, pink]

I dont know where my answer is wrong !

lists.py
colors = [ yellow, green, gray ]
colors + [ red, blue ]

1 Answer

Antonio De Rose
Antonio De Rose
20,852 Points
colors = [ yellow, green, gray ] # python will not understand, cause, it is of no datatype, string should within quotes 
colors + [ red, blue ] # why have you done it in 2 parts, 1 stretch, you could have added above, with 2 more colors
# still, if you want to break it, you have to use the operator like colors += ["red", "blue"]