fuzzywuzzy模块 全局匹配和子字符串匹配 from fuzzywuzzy import fuzz str1 = "ice" str2 = "icecream" print (fuzz.ratio(str1, str2)) # 55 print (fuzz.partial_ratio(str1, str2)) # 100