November 2018
Beginner
304 pages
7h 35m
English
There are a large number of methods that can be used with dictionaries.
We won't talk about all of them, but some of the more common ones are shown in the following screenshot:

Line 36 checks to see whether a specified key exists within the dictionary.
Line 37 returns all the items that exist within the dictionary—both keys and their associated values. For more flexibility, you can look for just a dictionary's keys (line 38) or just the values (line 39).
To remove entries within a dictionary, you can delete single items, as demonstrated in line 40. To remove all entries in dictionary d1, you would ...
Read now
Unlock full access