Dictionary Methods

 0    12 fiszek    sir
ściągnij mp3 drukuj graj sprawdź się
 
Pytanie Odpowiedź
Removes all the elements from the dictionary
rozpocznij naukę
. clear()
Returns a copy of the dictionary.
rozpocznij naukę
. copy()
Returns a dictionary with the specified keys and values
rozpocznij naukę
dict. fromkeys(keys, value)
Returns the value of the specified key
rozpocznij naukę
. get(key)
Returns a list containing the dictionary's keys
rozpocznij naukę
. keys()
Returns a list containing the a tuple for each key value pair
rozpocznij naukę
. items()
Removes the element with the specified key
rozpocznij naukę
. pop(key)
Removes the last inserted key-value pair
rozpocznij naukę
. popitem(keyname, defaultvalue)
Returns the value of the specified key. If the key does not exist: insert the key, with the specified value
rozpocznij naukę
. setdefault(keyname, value)
Updates the dictionary with the specified key-value pairs
rozpocznij naukę
. update(iterable)
Returns a list of all the values in the dictionary
rozpocznij naukę
. values()
Checks whether a dictionary possesses the give key/index.
rozpocznij naukę
. has_key()

Musisz się zalogować, by móc napisać komentarz.