Python generating a hash SHA256

Can any one give me a complete python code that generates a valid and random sha256 extraction hash using python? I know that bitcoin with a laptop is incredibly unprofitable, especially with python, I simply do it for experience. Thank you!