Hi!
I don't have much experience with python, so I hope you could help me.
I have to do a program that delete all the punctuations of a input txt document, but i can't figure out how to input the name(of the xy.txt) in the function.
Function
import string
def punc(s):
txt = open( ' s ', 'r').read() #s should be replaced with the name.txt
for punct in string.punctuation:
txt2 = txt.replace(punct,"")
return txt2
Program where you are supposed to enter the name of the txt document, you have to clean of punctuations
import function
s=raw_input("Enter the name of the text document: ")
a=function.punc(s)
print a
I would be very grateful if somebody could help me.