我要提取包含任何定义的标点符号的句子
2.example:
lookup =',',但我想在里面查找更多内容,例如(?!@ ,.)
lookup = ','
with open('testing_for_tools.txt') as myFile:
for num, line in enumerate(myFile, 1):
if lookup in line:
print('found at line:', num)
print(line)
输出仅对一个正确,:
found at line: 1
i went to city center, and i bought xbox5 , and some other stuff
found at line: 6
i have to go home, then sleep ؟