[英] How to check matching percentage of two string lists?
我是python的初学者.在这里,我在比较两个列表时遇到了一个问题.我的第一个问题是,不应该对列表进行精确比较.但它应该与其他列表进行大约70%个匹配的比较,如果存在,则返回true.contains()方法在这种情况下没有帮助.以下是我的列表:
TotalTags = ["citrus", "orange", "vitamin-C", "sweet", "yellow", "vitamin-A"] #etc
LikedTags = ["citrus", "orange", "vitamin-D"]