◐ Shell
clean mode source ↗

Python Language Tutorial => Lambda Function

Example

An anonymous, inlined function defined with lambda. The parameters of the lambda are defined to the left of the colon. The function body is defined to the right of the colon. The result of running the function body is (implicitly) returned.

s=lambda x:x*x
s(2)    =>4

Got any Python Language Question?

pdf PDF - Download Python Language for free



Previous Next