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

Efaz Khan
Efaz Khan
5,194 Points

Must be a bug in the question.

I am pretty sure my code is correct. Can someone please check?

Thank you

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

topic = student["topic"]

No you are not wrong there is most certainly a bug.

In [1]: student = {'name': 'Josh Stephens', 'topic': 'python'}
   ...: topic = student['topic']

In [2]: topic
Out[2]: 'python'

2 Answers

Ok playing around I was able to pass it. Change the value of topic in the student dictionary to be Python with a capital p. Probably the unit tests for this is not doing a case insensitive comparison on the assertion and thus it fails. Assuming that is how they are checking the results

Steven Parker
Steven Parker
231,275 Points

This was previously discovered by another student, but it probably wouldn't hurt to send another bug report in to the Support folks.