2 ms·It's also wrong - "readlines" keeps the "\n", and you've added another one between lines.by RiderOfGiraffes 17y agoIt's also wrong - "readlines" keeps the "\n", and you've added another one between lines.Luyt 17y agoIndeed. A cosmetic refinement, but it should really be: python -c "print ''.join(reversed(list(open('test.py'))))" That's even two characters less!spudlyo 17y agoGood, but too easy. Assume you can't keep the file in memory.