Re:How Ruby is beating Python in the battle for the Soul of ...
by jodrellblank on Monday October 03, 2011 @04:01PM
(#3067759)
Your split and join seem redundnant, and open defaults to read-only.
print open('whatever.file').readlines()[:-10]
But still, don't do that on any log too big to read into memory.
python -c "print '\n'.join(open('LICENSE.txt','r').read().split('\n')[:-10])"
But this is besides the point.