python 比较文本获得相似度利用python内置模块difflibfrom difflib import SequenceMatcher def Compare(str1, str2): s = SequenceMatcher(None, str1, str2).ratio() return s 最后修改:2022 年 05 月 18 日 © 允许规范转载 打赏 赞赏作者 支付宝微信 赞 0 如果觉得我的文章对你有用,请随意赞赏