Skip to main content

Processing Collections in Python Using Lambdas

Hands-On Lab

 

Photo of Keith Thompson

Keith Thompson

DevOps Training Architect II in Content

Length

00:30:00

Difficulty

Intermediate

Being able to perform actions on a collection is incredibly useful in any type of programming, and it is pretty common to need to perform a single action on each item. We could do this by using a loop, but there are built-in collection functions that can take a collection and a function or lambda to run each item through. In this hands-on lab, we utilize higher-order functions to process some existing lists by using lambdas. To feel comfortable completing this lab you'll want to know how to do the following: - Define and use lambdas. Watch "Defining and Using Lambdas" from the [Certified Associate in Python Programming Certification][1] course. - Use higher-order functions and collection functions. Watch "Using Collection Functions" from the [Certified Associate in Python Programming Certification][1] course. [1]: https://linuxacademy.com/cp/modules/view/id/470

What are Hands-On Labs?

Hands-On Labs are scenario-based learning environments where learners can practice without consequences. Don't compromise a system or waste money on expensive downloads. Practice real-world skills without the real-world risk, no assembly required.