How to remove a string from a txt file?
DL Neil
PythonList at DancesWithMice.info
Wed Sep 4 16:00:47 EDT 2019
On 5/09/19 3: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,
Is this a homework assignment?
What code do you have so far?
How to identify the beginning of the sub-string to be removed?
How to identify the end of the sub-string?
How does one "remove a string" AND "kept in this format"?
--
Regards =dn
More information about the Python-list
mailing list