Advanced Python data structures

Feel comfortable with strings, lists, and dicts? Go beyond the basics, digging into how they work and how to use them better.

About The Course

A huge part of coding in Python revolves around the core data structures: Strings, lists, tuples, and dicts. It’s not hard to start using those, and even to use them well.

 

This course aims to take you beyond the basics, what you get in a typical intro Python course. We’ll look at how the core data structures are implemented, and some of the limits that Python places on them. Then we’ll look at combinations of data structures, and the trade-offs involved in each of them. Finally, we’ll look at a number of useful data structures in the Python standard library, seeing how and when to best use them.

 

When you’re done with this course, you’ll not only feel more comfortable using the builtin data structures, but you’ll be able to confidently make decisions about when and how to use them.

This Course Will Show You How To...

_check-box

Learn how core data structures work under the hood

_check-box

Learn how to combine core data structures, and the various trade-offs associated with them

_check-box

Learn about additional data structures available in the standard library

Preview The Course

Object ids

Lists of lists

Size and limit of floats

Course Contents

Course Length

7.1 Hours

Number of Lessons

56

Training Materials

13 PDFs

Coding Exercises

7

  • Welcome (2 mins)
  • Object ids (8 mins)
  • is vs == (5 mins)
  • When to use is (6 mins)
  • sys.getsizeof (6 mins)
  • Boolean context (5 mins)
  • How big is an int? (3 mins)
  • Binary, hex, and octal numbers (8 mins)
  • Timing number conversions (3 mins)
  • Size and limit of floats (5 mins)
  • String interning (9 mins)
  • str.spitlines (4 mins)
  • combining and interpolating strings (11 mins)
  • List memory usage (6 mins)
  • Creating lists efficiently (3 mins)
  • Splitting and unpacking (6 mins)
  • Tuples (7 mins)
  • Sequences (5 mins)
  • Exercises 1 (2 mins)
  • Exercises 1 solutions (11 mins)
  • Creating dicts (7 mins)
  • Setting and retrieving key-value pairs (7 mins)
  • Iterating over dicts (6 mins)
  • Merging dicts (4 mins)
  • dict.fromkeys (5 mins)
  • Removing items from a dict (3 mins)
  • Sets and frozensets (7 mins)
  • Exercises 2 (3 mins)
  • Exercise 2 solutions (6 mins)
  • Complex data structures (3 mins)
  • Lists of lists (8 mins)
  • Movie store with a list of list (9 mins)
  • Movie store with a list of tuples (4 mins)
  • Exercises 3 (4 mins)
  • Exercises 3 solutions (17 mins)
  • Lists of dicts (11 mins)
  • Exercise 4
  • Exercise 4 solutions (10 mins)
  • Dict of dicts (10 mins)
  • Exercise 5 (2 mins)
  • Exercise 5 solution (14 mins)
  • Dics of lists (6 mins)
  • Exercise 6 (1 mins)
  • Exercise 6 solution (5 mins)
  • Advanced data structures in the standard library (3 mins)
  • Decimal (6 mins)
  • Named tuples (7 mins)
  • Exercise 7 (2 mins)
  • Exercise 7 solution (5 mins)
  • defaultdict (7 mins)
  • OrderedDict (3 mins)
  • Counter (6 mins)
  • Exercise 8 (3 mins)
  • Exercise 8 solutions (7 mins)
  • Enums (8 mins)
  • Exercise 9 (2 mins)
  • Exercise 9 solution (5 mins)
  • Conclusion (1 mins)

This Course Is Perfect For...

_check-box

Anyone who feels comfortable coding in Python with strings, lists, tuples, and dicts, and wants to add to their arsenal of knowledge, along with a deeper understanding of how they're all implemented.

GET STARTED NOW

Monthly

Annual

Save 20%

BUY THIS COURSE

One-Time Purchase (Lifetime Access)
$ 240 One-Time
  • Go deeper into core data structures
  • Go beyond the basics
  • Combine data structures in smart ways

OR

GET A MEMBERSHIP

Access All My Training
$ 40 Per Month
  • All my Python courses
  • Monthly office hours + special events
  • Private forum for members

BUY THIS COURSE

One-Time Purchase (Lifetime Access)
$ 240 One-Time
  • Go deeper into core data structures
  • Go beyond the basics
  • Combine data structures in smart ways

OR

GET A MEMBERSHIP

Access All My Training
$ 400 Per Year
  • All my Python courses
  • Monthly office hours + special events
  • Private forum for members

100% Money Back Guarantee

I’m a one-person company dedicated to improving your career via Python and related technologies. If you haven’t gotten value from any of my courses, then just tell me — and I’ll refund your money.

Meet Your Instructor

Reuven is a full-time Python trainer. In a given year, he teaches courses at companies in the United States, Europe, Israel, India, and China — as well as to people around the world, via his online courses.

Reuven created one of the first 100 Web sites in the world just after graduating from MIT’s computer science department. He opened Lerner Consulting in 1995, and has been offering training services since 1996.

In 2020, Reuven published “Python Workout,” a collection of Python exercises with extensive explanations, published by Manning. He’s currently finishing edits on “Pandas Workout,” a similar collection of exercises using the “Pandas” library for data analytics.

Reuven’s free, weekly “Better developers” newsletter, about Python and software engineering, is read by more than 30,000 developers around the globe. His “Trainer weekly” newsletter is popular among people who give corporate training.

Reuven’s most recent venture is Bamboo Weekly: Every Wednesday, he presents a problem based on current events, using a public data set. And every Thursday, he shared detailed solutions to those problems using Pandas.

Reuven’s monthly column appeared in Linux Journal from 1996 until the magazine’s demise in 2019. He was also a panelist on both the Business of Freelancing and Freelancers Show podcasts.

Reuven has a bachelor’s degree in computer science and engineering from MIT, and a PhD in learning sciences from Northwestern University. He lives in Modi’in, Israel with his wife and three children.