Here is my code:
(这是我的代码:)
from functools import partial
def x_in_y(word, inner):
return inner in word
wrong = ['mann','connaction','tee','rigt','putt']
sentence=['this mann is my son','the connaction is unstable','my tee is getting cold','put your hands down','rigt now','right behind my back']
for i in wrong:
print(f"Wrong: {i}")
filtered_names = filter(partial(x_in_y, inner=i), sentence)
for name in filtered_names:
print(name)
How could I add a correct word next to each labels?
(如何在每个标签旁边添加正确的单词?)
then it implies the correct word for each result. (则表示每个结果正确的单词。)
Like this one:
(像这个:)
Wrong: mann "should be man"
this mann is my son
Wrong: connaction "should be connection"
the connaction is unstable
Wrong: tee "should be tea"
my tee is getting cold
Wrong: rigt "should be right"
rigt now
ask by briiipo translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…