from difflib import SequenceMatcher, get_close_matches

def similar(a, b):
    return SequenceMatcher(None, a, b).ratio()
nome="D1OGO.IMT"
res="D10G01 IMT"

words = ["D1OGO.IMT"]
print(get_close_matches("D10G01 IMT", words))

print(similar(nome,res))

7d79d3d3535c7d89cc3fb6d0a56ad5eb3dcbfa70
<mask token>


def similar(a, b):
    return SequenceMatcher(None, a, b).ratio()


<mask token>

<mask token>


def similar(a, b):
    return SequenceMatcher(None, a, b).ratio()


<mask token>
print(get_close_matches('D10G01 IMT', words))
print(similar(nome, res))

<mask token>


def similar(a, b):
    return SequenceMatcher(None, a, b).ratio()


nome = 'D1OGO.IMT'
res = 'D10G01 IMT'
words = ['D1OGO.IMT']
print(get_close_matches('D10G01 IMT', words))
print(similar(nome, res))

from difflib import SequenceMatcher, get_close_matches


def similar(a, b):
    return SequenceMatcher(None, a, b).ratio()


nome = 'D1OGO.IMT'
res = 'D10G01 IMT'
words = ['D1OGO.IMT']
print(get_close_matches('D10G01 IMT', words))
print(similar(nome, res))

from difflib import SequenceMatcher, get_close_matches

def similar(a, b):
    return SequenceMatcher(None, a, b).ratio()
nome="D1OGO.IMT"
res="D10G01 IMT"

words = ["D1OGO.IMT"]
print(get_close_matches("D10G01 IMT", words))

print(similar(nome,res))
