Real Vim ninjas count every keystroke - do you?

Pick a challenge, fire up Vim, and show us what you got.

Changelog, Rules & FAQ, updates: @vimgolf, RSS.

Your VimGolf key: please sign in

$ gem install vimgolf
$ vimgolf setup
$ vimgolf put 4d42cde1e6dc010cb7000024

expand a list comprehension (python)

Please show your way to convert a list comprehension in python to an ordinary for-loop expression!

Start file
print [x**2 for x in xrange(10)]
End file
tmp = []
for x in xrange(10):
    tmp
.append(x**2)
print tmp

View Diff

1c1,4
< print [x**2 for x in xrange(10)]
---
> tmp = []
> for x in xrange(10):
>     tmp.append(x**2)
> print tmp

Solutions by @mevcar:

Unlock 8 remaining solutions by signing in and submitting your own entry
Created by: @vimgolfer

110 active golfers, 334 entries

Solutions by @mevcar:
43
#23 - Rändöm Tester / @mevcar

02/12/2012 at 03:59PM

44
#>27 - Rändöm Tester / @mevcar

02/12/2012 at 03:58PM

45
#>28 - Rändöm Tester / @mevcar

02/12/2012 at 04:03PM

47
#>32 - Rändöm Tester / @mevcar

02/12/2012 at 03:56PM

50
#>40 - Rändöm Tester / @mevcar

02/12/2012 at 03:54PM

53
#>55 - Rändöm Tester / @mevcar

02/12/2012 at 03:50PM

59
#>77 - Rändöm Tester / @mevcar

01/30/2012 at 08:47PM

59
#>77 - Rändöm Tester / @mevcar

02/12/2012 at 03:48PM