Dictionary Methods

 0    12 informačný list    sir
stiahnuť mp3 vytlačiť hrať Skontrolujte sa
 
otázka Odpoveď
Removes all the elements from the dictionary
začať sa učiť
. clear()
Returns a copy of the dictionary.
začať sa učiť
. copy()
Returns a dictionary with the specified keys and values
začať sa učiť
dict. fromkeys(keys, value)
Returns the value of the specified key
začať sa učiť
. get(key)
Returns a list containing the dictionary's keys
začať sa učiť
. keys()
Returns a list containing the a tuple for each key value pair
začať sa učiť
. items()
Removes the element with the specified key
začať sa učiť
. pop(key)
Removes the last inserted key-value pair
začať sa učiť
. popitem(keyname, defaultvalue)
Returns the value of the specified key. If the key does not exist: insert the key, with the specified value
začať sa učiť
. setdefault(keyname, value)
Updates the dictionary with the specified key-value pairs
začať sa učiť
. update(iterable)
Returns a list of all the values in the dictionary
začať sa učiť
. values()
Checks whether a dictionary possesses the give key/index.
začať sa učiť
. has_key()

Ak chcete pridať komentár, musíte byť prihlásený.