Python : Lambda

Sena
2 min readOct 31, 2022

--

Hi, I’m Sena. I am one of the participants of SistersLab Women in Tech Academy project supported by the Community Volunteers Foundation (https://www.tog.org.tr/en/). The project aims to empower people between the age of 20–28 who identify as woman, through 3 months long software training and supporting trainings to increase their participation in the workforce in the IT sector. You can access detailed information about the project using this link: https://sisterslab.co/women-in-tech-academy/

In this article, I will describe the little-known lambda that works great in python. Lambda functions are an important part of functional programming. Lambda allows you to write throw-away functions without needing to name them.

Syntax of Python Lambda Function

Default Value

“If-else” and “For” using lambda

Filter()

Filter() processes items matching the given expression and returns a new list.

Map()

The map() function in Python takes a function and a list.

I hope this article was helpful.If you want to see more examples, you can follow me on github.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Sena
Sena

No responses yet

Write a response