Change the content of a string
This docstring is a complete lie. Fix it.
Start file
def add(a, b):
""" Subtracts "x" from "y" """
return a + b
End file
def add(a, b):
""" Adds "a" to "b" """
return a + b
2c2
< """ Subtracts "x" from "y" """
---
> """ Adds "a" to "b" """
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
633 remaining solutions by
signing in and submitting your own entry
#634
Frank Hui / @frankhui -
Score: 69 -
12/29/10 @ 06:44
:1,$ s/Subtracts/Adds/<CR>:1,$ s/x/a/<CR>:1,$ s/from/to/<CR>:1,$ s/y/b/<CR>:w<CR>:q<CR>
0 comments
634 active golfers, 1732 entries
Leaderboard (lowest score wins):
07/09/2013 at 08:06AM
09/25/2013 at 03:19PM
11/15/2013 at 09:01PM
06/12/2018 at 08:58AM
04/29/2022 at 07:28PM
06/22/2025 at 11:41AM
07/11/2025 at 02:06PM
01/13/2026 at 04:34PM
12/29/2010 at 12:43AM
12/29/2010 at 06:49AM
12/29/2010 at 05:41PM
01/23/2011 at 11:22AM
08/18/2011 at 02:46AM
09/16/2011 at 01:07AM
#555 - Daniel Harrington / @rubiii
12/10/2011 at 07:46PM
11/26/2012 at 11:59PM
03/31/2016 at 04:43PM
04/18/2016 at 08:51AM
04/04/2024 at 07:03PM
04/13/2024 at 06:10PM
04/22/2024 at 02:23PM
08/09/2024 at 11:29AM
12/26/2024 at 08:11PM
05/14/2025 at 01:47PM
08/28/2025 at 03:38PM
10/11/2025 at 09:16AM
12/28/2010 at 11:29PM
12/28/2010 at 11:53PM
12/29/2010 at 04:18AM
12/29/2010 at 11:47AM