Skip to main content
HomePython

Python Toolbox

4.4+
104 reviews
Intermediate

Continue to build your modern Data Science skills by learning about iterators and list comprehensions.

Start Course for Free
4 hours12 videos46 exercises283,972 learnersTrophyStatement of Accomplishment

Create Your Free Account

GoogleLinkedInFacebook

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.
Group

Training 2 or more people?

Try DataCamp for Business

Loved by learners at thousands of companies


Course Description

In this Python Toolbox course, you'll continue to build more advanced Python skills. First, you'll learn about iterators, objects you have already encountered in the context of for loops. You'll then learn about list comprehensions, which are extremely handy tools for all data professionals and developers working in Python. You'll end the course by working through a case study in which you'll apply all the techniques you learned in both parts of this course.
For Business

Training 2 or more people?

Get your team access to the full DataCamp platform, including all the features.
DataCamp for BusinessFor a bespoke solution book a demo.

In the following Tracks

Certification Available

Associate Data Scientist in Python

Go To Track

Associate Python Developer

Go To Track

Python Programming Fundamentals

Go To Track
  1. 1

    Using iterators in PythonLand

    Free

    You'll learn all about iterators and iterables, which you have already worked with when writing for loops. You'll learn some handy functions that will allow you to effectively work with iterators. And you’ll finish the chapter with a use case that is pertinent to the world of data science and dealing with large amounts of data—in this case, data from Twitter that you will load in chunks using iterators.

    Play Chapter Now
    Introduction to iterators
    50 xp
    Iterators vs. Iterables
    50 xp
    Iterating over iterables (1)
    100 xp
    Iterating over iterables (2)
    100 xp
    Iterators as function arguments
    100 xp
    Playing with iterators
    50 xp
    Using enumerate
    100 xp
    Using zip
    100 xp
    Using * and zip to 'unzip'
    100 xp
    Using iterators to load large files into memory
    50 xp
    Processing large amounts of Twitter data
    100 xp
    Extracting information for large amounts of Twitter data
    100 xp
    Congratulations!
    50 xp
  2. 2

    List comprehensions and generators

    In this chapter, you'll build on your knowledge of iterators and be introduced to list comprehensions, which allow you to create complicated lists—and lists of lists—in one line of code! List comprehensions can dramatically simplify your code and make it more efficient, and will become a vital part of your Python toolbox. You'll then learn about generators, which are extremely helpful when working with large sequences of data that you may not want to store in memory, but instead generate on the fly.

    Play Chapter Now
For Business

Training 2 or more people?

Get your team access to the full DataCamp platform, including all the features.

In the following Tracks

Certification Available

Associate Data Scientist in Python

Go To Track

Associate Python Developer

Go To Track

Python Programming Fundamentals

Go To Track

datasets

TweetsWorld Bank World Development Indicators

collaborators

Collaborator's avatar
Yashas Roy
Collaborator's avatar
Francisco Castro
Hugo Bowne-Anderson HeadshotHugo Bowne-Anderson

Data Scientist

Hugo is a data scientist, educator, writer and podcaster formerly at DataCamp. His main interests are promoting data & AI literacy, helping to spread data skills through organizations and society and doing amateur stand up comedy in NYC. If you want to know what he likes to talk about, definitely check out DataFramed, the DataCamp podcast, which he hosted and produced.
See More

Don’t just take our word for it

*4.4
from 104 reviews
70%
17%
6%
5%
2%
Sort by
  • Alexander O.
    15 days

    An excellent course to learn about Generators and iterators. I enjoyed every bit of learning.

  • Sue D.
    20 days

    A very interesting course, and stunning instructor!

  • Enrique N.
    about 1 month

    A great way to deepen your understanding of Python.

  • Bujamin C.
    3 months

    ❤️

  • Ramasubramanian S.
    3 months

    Great and informative

"An excellent course to learn about Generators and iterators. I enjoyed every bit of learning."

Alexander O.

"A very interesting course, and stunning instructor!"

Sue D.

"A great way to deepen your understanding of Python."

Enrique N.

FAQs

Join over 15 million learners and start Python Toolbox today!

Create Your Free Account

GoogleLinkedInFacebook

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.