Operation
|
Description
|
dict.has_key(key)
|
returns True if
dictionary contains specified key and False otherwise
|
dict.values()
|
returns a list of
values in the dictionary
|
dict.items()
|
returns a list of
tuples, where each tuple contains a key and value pair
|
dict.get(key, default)
|
returnsvalue
associated with key if it exists, otherwise returns default value
|
del dict[key]
|
deletes the pair with
specified key from the dictionary
|
dict.clear()
|
removes all pairs from
the dictionary
|
key in dict
|
returns True if key is
in dict, False otherwise
|