Why does it say groceries is not a list?


#1

Question

Why does it say groceries is not a list?

Answer

In this project we’ve done a lot of work with dictionaries, which use { } curly braces and hold key-value pairs inside of them. But for this particular step, we’re going back to a simple list! Be sure to use [ ] brackets, like this:
my_list = [item1, item2]


FAQ: Learn Python – A Day at the Supermarket – Shopping at the Market