Dictionary Methods

 0    12 speciālā zīme    sir
lejupielādēt mp3 Drukāt spēlēt pārbaudiet sevi
 
jautājums atbilde
Removes all the elements from the dictionary
sākt mācīties
. clear()
Returns a copy of the dictionary.
sākt mācīties
. copy()
Returns a dictionary with the specified keys and values
sākt mācīties
dict. fromkeys(keys, value)
Returns the value of the specified key
sākt mācīties
. get(key)
Returns a list containing the dictionary's keys
sākt mācīties
. keys()
Returns a list containing the a tuple for each key value pair
sākt mācīties
. items()
Removes the element with the specified key
sākt mācīties
. pop(key)
Removes the last inserted key-value pair
sākt mācīties
. popitem(keyname, defaultvalue)
Returns the value of the specified key. If the key does not exist: insert the key, with the specified value
sākt mācīties
. setdefault(keyname, value)
Updates the dictionary with the specified key-value pairs
sākt mācīties
. update(iterable)
Returns a list of all the values in the dictionary
sākt mācīties
. values()
Checks whether a dictionary possesses the give key/index.
sākt mācīties
. has_key()

Lai ievietotu komentāru, jums jāpiesakās.