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 trialConnor Fitzpatrick
4,131 PointsHow do you assign the value of a key to a variable in a Python dictionary?
The challenge task is saying my code is incorrect and I don't know why. Trying to get the value of the 'topic' key.
student = {'name': '', 'topic': 'Python'}
topic = student['topic']
1 Answer
KRIS NIKOLAISEN
54,972 PointsThis challenge was previously broken and may have been fixed. Try with lower case 'python' in your dictionary.
Connor Fitzpatrick
4,131 PointsConnor Fitzpatrick
4,131 PointsLowercase 'python' did the trick. Thanks for the fast response!