Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python write to file while reading

# writin content of one file to the other
with open("source.txt", "r") as inFile, open("target.txt", "w") as outFile:
    for line in inFile:
        print(line.strip("
"), file=outFile)
 
PREVIOUS NEXT
Tagged: #python #write #file #reading
ADD COMMENT
Topic
Name
6+3 =