import hashlib
str1 = b'123'
result = hashlib.md5(str1) # creates an object
print (result.hexdigest())