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):
09/04/2020 at 09:37AM
#122 - kafang plays vimgolf / @KafangV
12/18/2020 at 08:29PM
05/07/2021 at 04:54AM
05/31/2021 at 07:40PM
09/14/2021 at 12:35AM
09/15/2021 at 10:49PM
11/14/2021 at 11:23PM
#128 - mattp (part of the 💉💉💉 club) / @mattpep
01/20/2022 at 02:41PM
04/27/2022 at 06:46AM
08/26/2022 at 09:14PM
10/21/2022 at 08:24PM
10/23/2022 at 04:04AM
07/16/2023 at 09:10AM
07/31/2020 at 10:31AM
06/06/2021 at 09:16PM
08/01/2021 at 07:53PM
#137 - Yochem van Rosmalen / @yoch3m
01/30/2022 at 08:24PM
03/03/2022 at 10:44AM
04/17/2022 at 03:40AM
04/25/2023 at 09:34PM
11/10/2024 at 10:13PM
07/31/2020 at 07:51PM
09/22/2020 at 02:02PM
12/08/2021 at 03:20AM
06/12/2023 at 04:16AM
08/11/2023 at 02:05PM
07/01/2024 at 10:12PM
05/14/2022 at 07:51PM
08/18/2020 at 06:50PM
06/06/2022 at 03:47PM