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 Introducing Dictionaries Introducing Dictionaries Creating a Dictionary

I don't understand why this won't access the value of topic.

I feel as though I'm doing it exactly as the lesson describes. Is my syntax off or is there something I'm not seeing?

creating_dictionaries.py
student = {'name':'','topic':'python'}
topic = student['topic']

3 Answers

Steven Parker
Steven Parker
231,275 Points

It looks like something slipped by QA! The instructions for task one should have told you to use "Python" (with capital "P") as the value for topic instead of "python".

You may want to submit a bug report to the Support folks. Besides helping to get it fixed, you could get an "Exterminator" badge. :beetle:

hi is there a way to pass through this stage

Steven Parker
Steven Parker
231,275 Points

Sure, just as I said before, use "Python" (with capital "P") as the value for topic instead of "python".

Michael McGill
Michael McGill
2,085 Points

as of September 11 2019, in this exercise, you no longer need python spelt with a capital 'P' as before. I read this thread when I was struggling with it and, changed my python to Python because I remembered the same thing happened on a previous challenge exercise. That was before I had figured out the correct code. But by the time my code was correct, no matter what I did, it wouldn't pass me. I was sure my code was correct. Well when I changed it back to lower case 'p' I passed it. Someone needs to delete those posts so they don't keep tripping people up.