Module 6 Summary
Thomas J. Kennedy
Having completed the Collections - Lists, Tuples, and Dictionaries module (i.e., Module 8) you should now be comfortable:
-
Creating a
list
and populating it with data -
Creating a
tuple
-
Using
sort
to sort data -
Creating a dictionary (hash map) and populating it with data
1 Questions to Consider
Take a few minutes to think about the following:
-
When is it appropriate to use a
tuple
over alist
? -
How can
sort
be used with custom comparison criteria? -
When should a generator expression be used of a list?
-
When should a dictionary be used instead of a
list
?
2 On to the Next Module…
The next module (i.e., File IO, Context Managers, and Exceptions) will cover tricks for working with files and the types of Exception
s that can occur.