I need to remove the punc from a text file.
The text file is like this
ffff, hhhh, & tommorw home,
Have you from gone?
I am trying
punc=(",./;'?&-")
f = open('file.txt', 'r')
for line in f: strp=line.replace(punc,"") print(strp)
I need the output to be:
ffff hhhh tommorw home
Have you from gone
This is returning each line, but the punc is still there> could use some help. Thanks