Comprehending Comprehensions

Understand how to write, read, and use comprehensions - a powerful tool for creating lists, dicts, and sets

About The Course

Comprehensions are one of the most powerful tools in a Python developer’s toolbox. But they are also hard for many people to understand, and are often ignored in favor of traditional “for” loops. In this course, you’ll learn not only what comprehensions are, but how they work, how and where you can put them to use, and why they should be used instead of “for” loops. You’ll even see (and finally understand) nested comprehensions, and use them to work through complex data structures.

If you have been avoiding the use of comprehensions because they seem too complex or difficult, then this course is for you.

This Course Will Show You How To...

_check-box

Understand how comprehensions work, and how they are different from "for" loops

_check-box

How to create lists, sets, and dicts using comprehensions

_check-box

Things to watch out for when creating set and dict comprehensions

_check-box

How and where to integrate comprehensions with user-defined functions.

_check-box

How to include conditions (including complex conditions) in your comprehensions

_check-box

How to write and use nested comprehensions

Preview The Course

Basic comprehension exercises
Complex comprehension exercises
Nested comprehension exercises

Course Contents

Course Length

2.2 Hours

Number of Lessons

21

Training Materials

10 PDFs

Coding Exercises

6

  • Intro and welcome (3 mins)
  • What is functional programming? (13 mins)
  • Intro to comprehensions (12 mins)
  • Basic comprehension exercises (4 mins)
  • Basic comprehension exercise solutions (6 mins)
  • More complex list comprehensions (10 mins)
  • Complex comprehensions exercises (5 mins)
  • Complex comprehension exercise solutions (9 mins)
  • Complex comprehension exercise 4 solution 
  • Set comprehensions (7 mins)
  • Set comprehension exercises (2 mins)
  • Set comprehension exercise solutions (6 mins)
  • Dict comprehensions (6 mins)
  • Dict comprehension exercises (4 mins)
  • Dict comprehension exercise solutions (8 mins)
  • Nested comprehensions (7 mins)
  • Nested comprehensions exercises (4 mins)
  • Nested comprehensions exercise solutions (5 mins)
  • Shoe store exercise (2 mins)
  • Shoe store exercise solution (8 mins)
  • Who cares? (5 mins)
  • Summary (2 mins)

This Course Is Perfect For...

_check-box

Any developer ready to finally understand comprehensions.

_check-box

Developers with a basic knowledge of core Python data structures, files, and functions.

_check-box

Anyone who wants to writing faster, more idiomatic code.

GET STARTED NOW

Monthly

Annual

Save 20%

BUY THIS COURSE

One-Time Purchase (Lifetime Access)
$ 96 One-Time
  • Lifetime Access
  • Online Streaming

OR

GET A MEMBERSHIP

Access All My Training
$ 40 Per Month
  • All My Python Courses
  • Monthly Office Hours
  • Private Forum
  • Special Events

BUY THIS COURSE

One-Time Purchase (Lifetime Access)
$ 96 One-Time
  • Lifetime Access
  • Online Streaming

OR

GET A MEMBERSHIP

Access All My Training
$ 400 Per Year
  • All My Python Courses
  • Monthly Office Hours
  • Private Forum
  • Special Events

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.