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):
08/01/2020 at 11:04PM
08/02/2020 at 04:14AM
08/04/2020 at 06:34PM
08/04/2020 at 09:41PM
08/05/2020 at 06:17PM
08/17/2020 at 08:29PM
03/19/2021 at 07:23PM
04/04/2021 at 06:07PM
07/12/2021 at 10:59AM
09/09/2021 at 01:49PM
01/23/2022 at 12:08PM
02/19/2022 at 03:35PM
03/07/2022 at 02:12PM
#104 - math is what I hate / @mpnmbn
03/13/2022 at 02:47PM
05/13/2022 at 03:24AM
06/04/2022 at 11:56PM
08/06/2020 at 09:26PM
08/20/2020 at 05:38AM
09/08/2020 at 07:50AM
09/30/2020 at 02:25PM
09/03/2021 at 09:53PM
11/04/2021 at 10:52AM
03/03/2022 at 01:38PM
04/06/2022 at 06:37PM
05/23/2022 at 06:16PM
08/15/2020 at 06:23PM
02/20/2021 at 09:49AM
04/15/2022 at 04:13PM
08/25/2022 at 11:18AM
03/31/2023 at 03:49PM