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
More information about the Python-list mailing list
Fri Feb 26 06:31:32 EST 2016
- Previous message (by thread): How to remove the line numbers from the file in python
- Next message (by thread): How to remove the line numbers from the file in python
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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()
- Previous message (by thread): How to remove the line numbers from the file in python
- Next message (by thread): How to remove the line numbers from the file in python
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list