Get unlimited access
Open in app
Home
Notifications
Lists
Stories

Write
Fatboy Slim
Fatboy Slim

Feb 18

·
1 min read

[Study][Python] lambda

This is a note for python study.

The Lambda can use a function by one line code.

For example, below add function is two lines as below.

def add_up(x,y):
return x+y

We can re-write one line as below.

add_up = lambda x, y:x+y

The result is the same.

--

--

More from Fatboy Slim

Interesting in any computer science.

Love podcasts or audiobooks? Learn on the go with our new app.

Try Knowable

Recommended from Medium

Kristofer Spinka

Kristofer Spinka

in

Herding Sheep

Why Software is Always “Late”

Ürgo Ringo

Ürgo Ringo

in

Wise Engineering

Building modular apps using Spring

Jia Wei Teh

Jia Wei Teh

in

Level Up Coding

An Alternative Way to Send Emails in Python

Jonathan Granier

Jonathan Granier

CS 373 Spring 2020

Superwalk

Superwalk

SuperWalk — Phases & Update Plans

Code Forever

Code Forever

Looping: Nested for loop In C

Mike McMillan

Mike McMillan

in

Level Up Coding

Learning C++: STL Algorithms Overview

Venkata vishnu teja

Venkata vishnu teja

Git: The Revolution In DevOps

AboutHelpTermsPrivacy


Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Fatboy Slim

Fatboy Slim

Interesting in any computer science.

More from Medium

Arifshahzad

Arifshahzad

What is Lambda Function in python…?

Spencer Roffey

Spencer Roffey

Simple Flask Application

Bilal Mussa

Bilal Mussa

in

Towards Dev

Changing POSIX code to Python

Baoshan Gu

Baoshan Gu

JSON schema and validation with Python

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Knowable