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 Collections (2016, retired 2019) Dictionaries Dict Basics

Logan Valdez
PLUS
Logan Valdez
Courses Plus Student 6,741 Points

I am having trouble with this quiz question on python dictionaries.

Quiz Question: “Set the key ‘color’ to the value ‘red’ My_car[blank] = [blank]

I put in my_car[“color”] = “red”, but I get an error. What is wrong with the code?

1 Answer

Steven Parker
Steven Parker
231,275 Points

That's the correct answer, perhaps you had a typo when answering the quiz.

Try it again.

Steven Parker
Steven Parker
231,275 Points

I see it now. You've got word-processor style ("curly") quotes around your values instead of plain programming quotes. I'll try enlarging the font to make the difference more visible:

:x: “color” :point_left: curly quotes

:white_check_mark: "color" :point_left: plain quotes

Code in quizzes or challenges will always use plain, programmer-style quotes.