Dictionary Flashcards
Used to store the data in a key-value pair format. Duplicates are not allowed.
Dictionary
What do you call a dictionary that contains another dictionary?
Nested dictionary
Returns a dictionary with the specified keys and values.
Fromkeys
Returns the value of the specified key
Get
Returns a list containing a tuple for each key value pair.
Items
Returns a list containing the dictionary’s key
Keys
Removes element with the specified key.
Pop
Removes the last inserted key-value pair
Popitem
Returns the value of the specified key. If the key does not exist: insert the key, with the specified value.
Setdefault
Updates the dictionary with the specified key-value pair
Update
Returns a list of all the values in the dictionary
Values