
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

MethodDescription Clear() Removes all the elements from the dictionary Copy() Returns a copy of the dictionary Fromkeys() Returns a dictionary with the specified keys and value Get() Returns the value of the specified key Items() Returns a list containing a tuple for each key value pair Keys() Returns a list containing the dictionary’s keys Pop() Removes the element with the specified key Popitem() Removes the last inserted key-value pair Setdefault() Returns the value of the specified key. If the key does not exist: insert the key, with the specified value Update() Updates the dictionary with the specified key-value pairs Values() Returns a list of all the values in the dictionary