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
631 remaining solutions by
signing in and submitting your own entry
#632
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
632 active golfers, 1724 entries
Leaderboard (lowest score wins):
09/11/2012 at 10:45AM
11/15/2012 at 08:06PM
04/25/2013 at 02:21AM
07/11/2013 at 08:18PM
08/08/2013 at 12:31PM
09/28/2013 at 07:00AM
10/05/2013 at 10:50PM
10/17/2014 at 05:25AM
12/18/2014 at 05:26PM
01/27/2015 at 02:29PM
03/04/2015 at 12:21PM
#372 - Sigurður Ægir Jónsso / @siggiae
03/27/2015 at 08:41AM
09/04/2015 at 07:42PM
02/08/2016 at 12:31PM
07/09/2019 at 02:06PM
09/03/2024 at 04:18PM
09/17/2024 at 04:34PM
#378 - Luiz Eduardo Amaral / @luxedo
05/10/2025 at 09:03PM
08/06/2025 at 06:26PM
12/28/2010 at 11:30PM
12/28/2010 at 11:42PM
12/29/2010 at 12:00AM
12/29/2010 at 12:56AM
12/29/2010 at 01:40PM
12/29/2010 at 08:14PM
12/29/2010 at 11:36PM
12/30/2010 at 06:59AM
01/02/2011 at 01:51PM
01/02/2011 at 03:43PM
01/05/2011 at 08:06PM