How to remove a string from a txt file?
Tobiah
toby at tobiah.org
Wed Sep 4 16:15:11 EDT 2019
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.
More information about the Python-list
mailing list