python read line by line and keep indent

DL Neil PythonList at DancesWithMice.info
Sat Apr 18 00:34:43 EDT 2020


On 18/04/20 11:10 AM, hnasr9999 at gmail.com wrote:
> I am reading a Python file and find an specific line, replace a text and then write back to the file.
> 
> When I check back the file, I am getting indent error.
> 
> How to fix this issue.


Please make it easier for us (volunteers giving-up our free time) to 
help you...

Please provide a copy-paste of the error message.

Please indicate which is the pertinent line of code.

Please consider if it would help to provide sample data (in and out)
- lines of text that have worked
- the line/lines that fail
-- 
Regards =dn


More information about the Python-list mailing list