I need to remove numbers from a text file in Windows XP. I am new to python and just installed it to clear the data.
I saved the test file in the folder C: \ folder1 \ test1.txt
The contexts on test1.txt are just one line:
It should not b3 delete3d, but the number at the end is yes 134411
I want to create a result1.txt file containing
It should not b3 delete3d, but the number at the end is yes
Here is what I have tried so far
import os fin = os.open('C:\folder1\test1.txt','r')
I get the following error:
TypeError: an integer is required.
I am not sure what whole it expects.
Could you let me know how to program to get the result I want. Many thanks for your help.
source share