Dictionary Methods

 0    12 карточки    sir
скачать mp3 Печать играть Проверьте себя
 
Вопрос Ответ
Removes all the elements from the dictionary
начать обучение
. clear()
Returns a copy of the dictionary.
начать обучение
. copy()
Returns a dictionary with the specified keys and values
начать обучение
dict. fromkeys(keys, value)
Returns the value of the specified key
начать обучение
. get(key)
Returns a list containing the dictionary's keys
начать обучение
. keys()
Returns a list containing the a tuple for each key value pair
начать обучение
. items()
Removes the element with the specified key
начать обучение
. pop(key)
Removes the last inserted key-value pair
начать обучение
. popitem(keyname, defaultvalue)
Returns the value of the specified key. If the key does not exist: insert the key, with the specified value
начать обучение
. setdefault(keyname, value)
Updates the dictionary with the specified key-value pairs
начать обучение
. update(iterable)
Returns a list of all the values in the dictionary
начать обучение
. values()
Checks whether a dictionary possesses the give key/index.
начать обучение
. has_key()

Вы должны войти в свой аккаунт чтобы написать комментарий.