Re:The Non-Programming Programmer
by Luyt on Monday February 22, 2010 @02:08PM
(#1143443)
Hmmm, slightly longer then the Perl version ;-)
Somewhat more elegant, but still lots of parentheses.
[ Parent
| on HN ]
Re:The Non-Programming Programmer
by RiderOfGiraffes on Monday February 22, 2010 @02:36PM
(#1143506)
It's also wrong - "readlines" keeps the "\n", and you've added another one between lines.
Indeed. A cosmetic refinement, but it should really be:
python -c "print ''.join(reversed(list(open('test.py'))))"
That's even two characters less!