[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to remove a string from a txt file?

On 9/4/19 8:08 AM, Spencer Du wrote:
> Hi
> I want to remove a string from a txt file and then print out what I have removed. How do I do this.
> The txt file is in this format and should be kept in this format.
> txt.txt:
> laser,cameras,
> Thanks

Do you want to remove one of the fields by using an argument?  Like:

	my_py_solution txt.txt cameras

Its not clear what you are trying to achieve.