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):
02/17/2021 at 05:04AM
03/14/2021 at 07:21AM
03/21/2021 at 03:05PM
03/22/2021 at 12:38AM
05/18/2021 at 01:11PM
05/19/2021 at 04:16PM
05/19/2021 at 09:56PM
05/28/2021 at 05:28AM
06/11/2021 at 05:12PM
06/13/2021 at 06:51PM
06/21/2021 at 10:16PM
07/25/2021 at 03:29AM
07/31/2021 at 12:17AM
08/04/2021 at 02:15PM
08/15/2021 at 03:14PM
08/25/2021 at 04:44AM
08/27/2021 at 08:46AM
09/16/2021 at 10:39AM
10/07/2021 at 08:14PM
11/18/2021 at 08:34PM
12/16/2021 at 06:13AM
01/01/2022 at 12:15AM
01/07/2022 at 03:05AM
01/14/2022 at 06:44AM
02/25/2022 at 01:48AM
03/03/2022 at 08:50AM
03/03/2022 at 09:22AM
03/03/2022 at 09:29AM
03/03/2022 at 09:59AM
03/03/2022 at 01:19PM