Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Preview
Video Player
00:00
00:00
00:00
- 2x 2x
- 1.75x 1.75x
- 1.5x 1.5x
- 1.25x 1.25x
- 1.1x 1.1x
- 1x 1x
- 0.75x 0.75x
- 0.5x 0.5x
Learn the basics of Python dictionaries.
Before beginning this course, be sure you've completed Python Sequences first!
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up-
Erik Embervine
Python Development Techdegree Student 2,442 Points1 Answer
-
Philip Grimmett
12,069 Points1 Answer
View all discussions for this video
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
[MUSIC]
0:00
Welcome to Introducing Dictionaries,
0:09
I'm Ashley Boucher and
I'll be your teacher for this course.
0:11
Before moving forward, take a second
to check the teacher's notes and
0:14
make sure you've completed all of
the prerequisites for this course.
0:16
Remember, any questions you have can
be asked in the Treehouse community.
0:19
The community is also a great
place to help other students and
0:23
answer their questions as well.
0:25
Ready to get started?
0:27
In this course you're going to learn about
a new type of Python data structure,
0:29
the dictionary.
0:32
A dictionary is a set of key value pairs.
0:33
Think of a Python list, an ordered
sequence of comma separated values,
0:36
indexed by numbers.
0:41
A dictionary does have
similarities to a list.
0:42
For instance, dictionaries also
contain comma separated values,
0:45
but that's really where
the similarities end.
0:49
In a dictionary, each of its
values has a label called the key.
0:51
And dictionaries are not sequences,
they aren't ordered.
0:55
They're indexed by their keys,
not numbers.
0:58
You'll see variations of dictionaries in
just about every programming language.
1:02
You might know them as associative
arrays or associative memories.
1:05
They're the earliest stepping
stone in thinking about object
1:09
oriented programming,
1:12
a design pattern that revolves around
modeling reusable objects in your code.
1:13
It's an exciting topic,
1:18
join me in the next video to start
learning more about key value pairs.
1:20
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