# Compute the new signature point
P = k * G (k = your new k on test)
# Check if the x-coordinate of the signature point matches r
if P.x() == r:
print(f"Found k candidate: {k:x} ")
private_key = (s * k - z) * mod_inv(r, n) % n
print("Private Key : %02x " % private_key)
Thank You!!