これは私が持っている文字列のリストです:
[
['It', 'was', 'the', 'besst', 'of', 'times,'],
['it', 'was', 'teh', 'worst', 'of', 'times']
]
times,
句読点を, to be'times',','
または別の例で分割する必要がWhy?!?
ある場合は、 be が必要です'Why','?!?'
import string
def punctuation(string):
for word in string:
if word contains (string.punctuation):
word.split()
私はそれがPython言語ではないことを知っています! しかし、それは私がやりたいことです。