我做了什么错误/什么?
import sys
import string
def remove(file):
punctuation = string.punctuation
for ch in file:
if len(ch) > 1:
print( error - ch is larger than 1 --| {0} |-- .format(ch))
if ch in punctuation:
ch =
return ch
else:
return ch
ref = (open("ref.txt","r"))
test_file = (open("test.txt", "r"))
dictionary = ref.read().split()
file = test_file.read().lower()
file = remove(file)
print(file)
页: 1