Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Ways to Use List Comprehension in Python - Dictionary and Sets, Too!

Caleb Curry via YouTube

Overview

Google, IBM & Meta Certificates – 40% Off
One Coursera Plus subscription covers most Professional Certificates on Coursera.
Unlock All Certificates
This focused tutorial demonstrates Python comprehensions for processing, filtering, reversing, flattening, replacing, and combining collections. It also covers set and dictionary comprehensions, zip, and flipping dictionary keys and values.

Syllabus

- Introduction
- Process each element through a function
- Reverse strings in a list
- Filter through a List
- Get all elements from another list
- Flatten a list
- Replace elements in a list
- Product of lists
- Set comprehension
- Dictionary Comprehension
- More on Zip
- Flip dictionary Key and Value
- Flip a list of tuple values

Taught by

Caleb Curry

Reviews

Start your review of Ways to Use List Comprehension in Python - Dictionary and Sets, Too!

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.