Relative Content

Tag Archive for pythonfor-loopif-statementreplace

Multireplacement in .dat file lines

I have a .dat file. I want to read each line and replace a value in each line with a different value. Then save this to a new out.dat file. Every replacement is independent and I want to copy over the first 25 lines before starting the replacement. I am also doing this multiple times to create many different out files, hence the “for k in chan” in the beginning of my attempt.