Ironhack logo

Lab | List Comprehensions

Introduction

As you have learned in the List Comprehension lesson, list comprehensions allow you to efficiently perform iteration, storage, and even filtering based on conditional statements. List comprehensions are useful for a variety of things, so it is critical that you get sufficient practice and become skilled at identifying when to use them.

In this lab, you will practice constructing list comprehensions and using them to extract and filter information in a variety of scenarios. You will work on your own but remember the teaching staff is at your service whenever you encounter problems.

Getting Started

Open the main.ipynb file in the your-code directory. There are a bunch of questions to be solved. If you get stuck in one exercise you can skip to the next one. Read each instruction carefully and provide your answer beneath it.

Deliverables

  • main.ipynb with your responses to each of the exercises.

Submission

Upon completion, add your deliverables to git. Then commit git and push your branch to the remote.

Resources