Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python read file delete first line

with open('file.txt', 'r') as fin:
    data = fin.read().splitlines(True)
with open('file.txt', 'w') as fout:
    fout.writelines(data[1:])
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #read #file #delete #line
ADD COMMENT
Topic
Name
3+6 =