What’s in a Lambda?

An overview of anonymous functions in Python and why you should use them

Murtaza Ali
Towards Data Science
4 min readJan 14, 2022

--

Photo by OpenIcons on Pixabay

When I was a TA for introductory computer science, one of the topics which routinely confused my students was lambda functions in Python. This confusion manifested in one of two ways: 1) difficulty understanding how exactly these functions work, and 2) perplexity regarding why they should be used at all.

--

--

PhD student at the University of Washington. Interested in human-computer interaction, data visualization, and computer science education.