Summary

In this chapter, you learned about dictionaries, how to create an empty dictionary, adding items to the dictionary, and accessing and deleting values from a dictionary. In order to find the number of items in a dictionary, we used the len() function. There are other useful functions, such as max() and min() to find the maximum and minimum values in a dictionary, respectively. In dictionary methods you learned different methods, such as copy(), keys(), and items(). By using items(), we can iterate through a dictionary. In the end, you learned two memory-saving methods: iteritems() and iterkeys().

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.129.194.123