Text = ['This is Today', 'Not Tomorrow','Or Day Before','Not Tomorrow','Or Day After']
Copy = Text
for i in range (0, len(Text) - 1):
print(i, Text[i])
Line = Text[i]
for j in range (i+1, len(Text)):
print(j, Text[j])
NLine = Text[j]
lev = Levenshtein.ratio(Line, NLine)
if lev > 0.85:
print('Before Text Size: ', len(Text))
del Copy[j]
print('After Text Size: ', len(Text))
Text = Copy
yield:IndexError:列表索引超出范围 即使del操作在Copy。