input: 
  
  def hash_block(self):
      """ Computes the hash of the block contents.
      >>> block = Block(1, "2023-04-20 10:00:00", "Genesis Block Data", "0")
      >>> block.hash_block()
      '5c3dceabddda5a2b5e6725819152f6b3e0edf749d869e2bd61979795b7bae65c'
      """
      sha = hashlib.sha256()
      sha.update((str(self.index) + 
                  str(self.timestamp) + 
                  str(self.data) + 
                  str(self.previous_hash)).encode('utf-8'))
      return sha.hexdigest()
  
  
output:     import hashlib