How to remove the line numbers from the file in python

Peter Heitzer peter.heitzer at rz.uni-regensburg.de
Fri Feb 26 06:31:32 EST 2016


Ganesh Pal <ganesh1pal at gmail.com> wrote:
>what would be the easiest way to remove the lines in the leading
>numbers 1.e 1 ,2,.... 19  from this file  using python ?
import sys,re
for line in sys.stdin:
	print re.sub('^\d+','',line).rstrip()




More information about the Python-list mailing list