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
140 remaining solutions by
signing in and submitting your own entry
#141
Tony Buranzon / @therealTbunz -
Score: 32 -
03/19/21 @ 06:29
dtfli =<Esc>llctxlambda x: <Esc>lldfx<Esc>ZZ
0 comments
#142
Derya / @dbmeral -
Score: 32 -
04/02/22 @ 12:13
dexldexr=i <Esc>llldeilambda x:<Esc>:wq<CR>
0 comments
142 active golfers, 410 entries
Leaderboard (lowest score wins):
03/03/2022 at 01:36PM
03/03/2022 at 05:27PM
03/06/2022 at 07:45AM
03/08/2022 at 03:01PM
04/22/2022 at 03:46AM
04/22/2022 at 03:55AM
05/06/2022 at 08:24AM
05/19/2022 at 01:11AM
05/24/2022 at 11:17PM
06/14/2022 at 08:14AM
06/20/2022 at 11:42PM
07/14/2022 at 05:23AM
07/26/2022 at 09:40PM
08/22/2022 at 12:15PM
09/30/2022 at 02:01AM
10/06/2022 at 08:46AM
11/08/2022 at 03:55AM
12/30/2022 at 06:57PM
03/24/2023 at 10:11PM
03/24/2023 at 11:03PM
03/31/2023 at 06:00AM
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