I have a multi-line string in python, and I want to replace a specific line number of it. I have a loop that goes through each line and increments the line number by 1, but what do I do when I reach the line I need to replace? Any suggestions?
I have a multi-line string in python, and I want to replace a specific line number of it. I have a loop that goes through each line and increments the line number by 1, but what do I do when I reach the line I need to replace? Any suggestions?