I'm taking my first steps with Python and I'm seeing how text manipulation in files works.
If I have the following structure (Original file):
000000 00/0/0000 00:00:00 000000000000 00000 000000 0
000000 00/0/0000 00:00:00 000000000000 00000 000000 0
What would be the best way to transform following a pattern (or mask):
xxx.yyy("000000", "00/0/0000 00:00:00", "000000000000", "00000", "000000", "0")
Expected result would be (New file):
xxx.yyy("000000", "00/0/0000 00:00:00", "000000000000", "00000", "000000", "0")
xxx.yyy("000000", "00/0/0000 00:00:00", "000000000000", "00000", "000000", "0")
The idea in the case that I imagine would be to read the original file and create a secondary file and then save it. Opening the original file I will go through a conditional loop line by line but at this point how would I do to identify following the mask pattern?
question from:
https://stackoverflow.com/questions/66054200/changing-line-in-file-with-mask-python 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…