input: from typing import List
  
  def hash_block(block: dict) -> str:
      """
      Function to hash a block in a blockchain.
      The block is hashed using SHA-256 algorithm by concatenating all the block's contents: index, timestamp, data, previous_hash.
      >>> hash_block({"index": 1, "timestamp": "2023-10-10 12:00:00", "data": "Genesis Block", "previous_hash": "0"})
      '54f6c3c931a1fec20ace238e512ddb468ace95fa0cbd5be9f394f6c03bdec339'
      >>> hash_block({"index": 2, "timestamp": "2023-10-10 12:01:00", "data": "Second Block", "previous_hash": '54f6c3c931a1fec20ace238e512ddb468ace95fa0cbd5be9f394f6c03bdec339'})
      '8e8a7e9c2e1b2e971c985a9e8b7b9c2e3d2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f'
      """
output:     import hashlib
  
      block_string = f"{block['index']}{block['timestamp']}{block['data']}{block['previous_hash']}".encode()
      return hashlib.sha256(block_string).hexdigest()