Re: How to remove the line numbers from the file in python

2016-02-27 Thread Ganesh Pal
Thanks it works fine :) On Fri, Feb 26, 2016 at 5:01 PM, Peter Heitzer wrote: > Ganesh Pal 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+',

Re: How to remove the line numbers from the file in python

2016-02-26 Thread Peter Heitzer
Ganesh Pal 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() -- https://mail.python.org/mailman/listinfo/python-list

Re: How to remove the line numbers from the file in python

2016-02-26 Thread Peter Otten
Ganesh Pal 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 ? > > > 1 import os > 2 Suite = "Test Mail" > 3 > 4 def sendMail(x): > 5 text = x > 6 sendmail_location = "/home/prasad/onefs/share/se

How to remove the line numbers from the file in python

2016-02-26 Thread Ganesh Pal
what would be the easiest way to remove the lines in the leading numbers 1.e 1 ,2, 19 from this file using python ? 1 import os 2 Suite = "Test Mail" 3 4 def sendMail(x): 5 text = x 6 sendmail_location = "/home/prasad/onefs/share/sendmail" # sendmail location 7 p =