Swap values inside brackets
Easy challenge.
Start file
#Everyday routine... :\ amazing_func("Some amazing text", 123, variable) # Kittens def func(): return 'Stuff for making movement harder' def func2(m): v = 0 for i in range(10): v += i*m print(v, i, m) very_strange_func(42, foobar, 'Another text') # Dogs test = func() func2(len(test))
End file
#Everyday routine... :\ amazing_func(42, foobar, 'Another text') # Kittens def func(): return 'Stuff for making movement harder' def func2(m): v = 0 for i in range(10): v += i*m print(v, i, m) very_strange_func("Some amazing text", 123, variable) # Dogs test = func() func2(len(test))
View Diff
3c3 < amazing_func("Some amazing text", 123, variable) # Kittens --- > amazing_func(42, foobar, 'Another text') # Kittens 14c14 < very_strange_func(42, foobar, 'Another text') # Dogs --- > very_strange_func("Some amazing text", 123, variable) # Dogs
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 578 remaining solutions by signing in and submitting your own entry
#579 ser / @ser_robo - Score: 154 - 02/29/20 @ 08:36
jjr<Esc>wwciwcjhh<Esc>hhhhce42,<Esc>wcf"foobar<Esc>wwce''h<BS><Left>Another text<Esc>wwce<Esc>hxx<Esc>r<Esc>jjjjjj154<BS><BS>14Geeehce""<Left>Some amazing text<Esc>r<Esc>ewce123<Esc>wwce<Esc>c<Esc>llcf'variable<Esc>ba<Esc>i<BS><Esc>jjj<Esc>:wq<CR>
0 comments
#580 nickGPT / @nickandbro - Score: 154 - 08/27/24 @ 05:09
jjr<Esc>wwciwcjhh<Esc>hhhhce42,<Esc>wcf"foobar<Esc>wwce''h<BS><Left>Another text<Esc>wwce<Esc>hxx<Esc>r<Esc>jjjjjj154<BS><BS>14Geeehce""<Left>Some amazing text<Esc>r<Esc>ewce123<Esc>wwce<Esc>c<Esc>llcf'variable<Esc>ba<Esc>i<BS><Esc>jjj<Esc>:wq<CR>
0 comments
Created by: @Tpouhuk2 Tweet
580 active golfers, 2500 entries
Leaderboard (lowest score wins):
#16 - πππππππ πππ’πππππ / @TitouanT_
02/01/2019 at 04:36PM