| dict. Clear () |
Delete all elements in a dictionary |
| dict. Copy () |
Returns a copy of a dictionary (shallow copy) |
| DICT.FROMKEYSC (Seq,val=none) |
Creates and returns a new dictionary, which is the key of the dictionary in Seq, and Val does the initial value for all keys in the dictionary (none is default if this value is not provided) |
| Dict.get (Key,default=none) |
Returns the value of the key in the dictionary dict, and returns the value of default if this key is not present in the dictionary (note that the default value for parameter default is None) |
| Dict.has_key (Key) |
Returns true if the key is present in the dictionary, or false. After the Python2.2 version is introduced in and not, this method is almost obsolete, but still provides a working interface. |
| Dict.items () |
Returns a list containing the dictionary (key, value) to tuple |
| Dict.keys () |
Returns a list containing the keys in the dictionary |
| Dict.values () |
Returns a list containing all the values in the dictionary |
| Dict.iter () |
Methods Iteritems (), Iterkeys (), itervalues () are the same as their corresponding non iterative methods, but they return an iteration rather than a list. |
| Dict.pop (key[, default]) |
Similar to the method get (), if the key key in the dictionary exists, deletes and returns Dict[key], and throws a Keyerror exception if the key does not exist and the value of default is not given. |
| Dict.setdefault (Key,default=none) |
Similar to the method set (), if the key is not present in the dictionary, it is assigned a value by Dict[key]=default. |
| Dict.setdefault (Key,default=none) |
Similar to the method set (), if the key is not present in the dictionary, it is assigned a value by Dict[key]=default. |