Level 75 Level 77
Level 76

[No Typing] Dictionary Functions & Methods


13 words 0 ignored

Ready to learn       Ready to review

Ignore words

Check the boxes below to ignore/unignore words, then click save at the bottom. Ignored words will never appear in any learning session.

All None

Ignore?
cmp(dictionary1, dictionary2)
compares elements of two dictionaries
len(dictionary)
returns the number of elements in the dictionary
str(dictionary)
Converting a dictionary into a string
type(dictionary)
Returns the type of a dictionary
dictionary.copy()
Returns a copy of a dictionary
dictionary.fromkeys(list, default_value)
Creating a dictionary with keys form a list and value to a value
dictionary.get(key)
Returns a value for the given key in a dictionary
dictionary.has_key(key)
Returns true if a dictionary has a specified key, otherwise false
dictionary.items()
Returns a list of (key, value) tuple pairs from the items of a dictionary
dictionary.keys()
Returns a list of the keys from a dictionary
dictionary.setdefault(key, default)
Returns a value for a key if available otherwise sets the default values of this new key in the dictionary
dictionary1.update(dictionary2)
Updates and adds a dictionary into another dictionary
dictionary.values()
Returns a list containing all the values of a dictionary