Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

parsing a file and adding a number at starting of every line sentence python

import fileinput
import sys

for line in fileinput.input(['./ampo.txt'], inplace=True):
    sys.stdout.write('EDF {l}'.format(l=line))
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #parsing #file #adding #number #starting #line #sentence #python
ADD COMMENT
Topic
Name
1+7 =