Dictionary Flashcards

1
Q

Used to store the data in a key-value pair format. Duplicates are not allowed.

A

Dictionary

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What do you call a dictionary that contains another dictionary?

A

Nested dictionary

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Returns a dictionary with the specified keys and values.

A

Fromkeys

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Returns the value of the specified key

A

Get

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Returns a list containing a tuple for each key value pair.

A

Items

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Returns a list containing the dictionary’s key

A

Keys

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Removes element with the specified key.

A

Pop

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Removes the last inserted key-value pair

A

Popitem

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Returns the value of the specified key. If the key does not exist: insert the key, with the specified value.

A

Setdefault

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Updates the dictionary with the specified key-value pair

A

Update

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Returns a list of all the values in the dictionary

A

Values

How well did you know this?
1
Not at all
2
3
4
5
Perfectly