from difflib import SequenceMatcher a_str = 'abcd' b_str = 'bcd' SequenceMatcher(None, a_str, b_str).ratio()
0.8571428571428571
match_rate = f'{SequenceMatcher(None, a_str, b_str).ratio()*100:.1f}%' match_rate
'85.7%'
difflib — 델타 계산을 위한 도우미