Python Introducing Dictionaries Introducing Dictionaries Creating a Dictionary

Thomas Ma
Thomas Ma
15,199 Points

On an empty line beneath the existing code, create a variable called topic and assign to this variable the value of the

Plz help

creating_dictionaries.py
student = {'name':'Casper', 'topic':'Python'}

name = student['python']

1 Answer

Josh Keenan
Josh Keenan
19,401 Points

So, I am going to assume you almost had it, but Treehouse is fickle.

topic = student['topic']

This is the solution, but if you copy that your code will still fail, because in the student dictionary, topic has to be 'python' and not 'Python'. Change that in the dictionary and then that line will solve it.

Thomas Ma
Thomas Ma
15,199 Points

It is not working and yes i read what you said