bitcoincore development – Bit Coin Mining

Sorry for being noob. I am in the process of developing Bitcoin Mining in Python, just curious about whether, can we able to receive the percentage of guess in Target Hash Function via API.

For Example:

Target Hash: 3a42c503953909637f78dd8c99b3b85ddde362415585afc11901bdefe8349102
My hash : aa42c503953909637f78dd8c99b3b85ddde362415585afc11901bdefe8349102

80% Guess kinda..

Your help will be appreciated.

Thank you