Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Introducing Dictionaries!
You have completed Introducing Dictionaries!
Preview
Add and change values in Python dictionaries.
This video doesn't have any notes.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
And these changes are done using
syntax we've already covered.
0:00
Let's keep working with our previous
example down in the console.
0:03
The course dictionary here
has three key value pairs.
0:07
To change the value for any of these keys,
we access it using the key.
0:10
And then,
like we assign a value to a variable,
0:13
we assign a new value to the key.
0:16
So say I want to change the value for
the teacher key.
0:18
First, I'll access the value.
0:21
Then I assign it a new value
using the equals sign.
0:26
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up