Python: Def to Lambda
LAMBDA!!!
Start file
def f(x): return x ** 2
End file
f = lambda x: x ** 2
1c1
< def f(x): return x ** 2
---
> f = lambda x: x ** 2
Solutions
The best way to learn is to practice. Below, you will find some of the solutions other golfers have entered. To unlock higher ranked solutions, submit your own entry which does as well or better than the solutions you can currently see - climb the ladder!
Check out these helpful resources to improve your Vim skills... Game on.
Unlock
154 remaining solutions by
signing in and submitting your own entry
#155
Tony Buranzon / @therealTbunz -
Score: 32 -
03/19/21 @ 06:29
dtfli =<Esc>llctxlambda x: <Esc>lldfx<Esc>ZZ
0 comments
#156
Derya / @dbmeral -
Score: 32 -
04/02/22 @ 12:13
dexldexr=i <Esc>llldeilambda x:<Esc>:wq<CR>
0 comments
156 active golfers, 455 entries
Leaderboard (lowest score wins):
07/31/2020 at 11:00AM
07/31/2020 at 01:30PM
07/31/2020 at 03:52PM
07/31/2020 at 04:45PM
07/31/2020 at 06:46PM
07/31/2020 at 08:43PM
08/01/2020 at 07:43AM
08/02/2020 at 06:44PM
08/03/2020 at 01:07PM
08/03/2020 at 04:25PM
08/03/2020 at 04:45PM
08/03/2020 at 10:53PM
08/04/2020 at 11:13PM
08/05/2020 at 08:56AM
08/08/2020 at 06:20PM
08/10/2020 at 06:11AM
08/11/2020 at 08:35AM
08/17/2020 at 08:50AM
08/25/2020 at 06:10PM
08/31/2020 at 12:08PM
08/31/2020 at 08:03PM
09/05/2020 at 10:01PM
09/18/2020 at 09:11PM
10/12/2020 at 08:12AM
11/09/2020 at 07:17PM
01/01/2021 at 12:58PM
01/21/2021 at 12:33AM
01/27/2021 at 01:59AM
02/08/2021 at 07:22PM
02/09/2021 at 06:41AM