Mimick tac with python.

Hongyi Zhao hongyi.zhao at gmail.com
Fri Jan 29 23:46:37 EST 2016


Hi all,

I can use the following methods for mimicking tac command bellow:

awk '{a[NR]=$0} END {while (NR) print a[NR--]}' input_file
perl -e 'print reverse<>' input_file

Is it possible to do the same thing with python?

Regards
-- 
.: Hongyi Zhao [ hongyi.zhao AT gmail.com ] Free as in Freedom :.



More information about the Python-list mailing list