Welcome to this lesson. Today you will learn about some powerful new data structures: namedtuple
, defaultdict
, Counter
and deque
.
Today you watch the videos. I also prepared a Jupyter notebook so you can follow along with this lesson.
You get to use these new data structures I encourage you to code an exercise: PyBites Code Challenge 13 - Highest Rated Movie Director.
See the notebook for more info how to complete this exercise.
You can also take a slimmed down version of this exercise on our platform.
We challenge you to find your own data set and try to use the new collections data structures yourself.
Stuck at finding examples? We used collections
quite a bit for when we did the 100 Days of Code:
$ python module_index.py |grep collections
collections | stdlib | 001, 021, 023, 034, 036, 042, 045, 055, 057, 063, 076, 084, 086, 095, 096
Be sure to share your last couple of days work on Twitter or Facebook. Use the hashtag #100DaysOfCode.
Here are some examples to inspire you. Consider including @talkpython and @pybites in your tweets.
See a mistake in these instructions? Please submit a new issue or fix it and submit a PR.