def my_md5(str): import hashlib new_str = str.encode() #Convert the string to bytes type # new_str = b'%s'%str #Convert the string to bytes type m = hashlib.md5() #Instantiate the md5 object m.update(new_str ) #encryption return m.hexdigest () #get the result and return 96e79218965eb72c92a549dd5a330112