I have a text file with the following contents:
name 1,
name 2,
name 3,
...
In python, how do I search for a line and write to it as well?
For example, I want to write to the line beginning with "name 2"
name 1,
name 2,name 1,
name 3,
...
Any help would be greatly appreciated!