input: Write a function to implement a simple Python blockchain system as described. The function should create a blockchain, add blocks to it, and print the blockchain. The Block class should have attributes for index, timestamp, data, and previous_hash, along with a method to calculate the hash of the block. The function should also include the implementation of a method to create the genesis block and a method to generate subsequent blocks.
  assert create_blockchain() == None
  assert print_blockchain() == None
output: def create_blockchain():
      class Block:
          def __init__(self, index, timestamp, data, previous_hash):
              self.index = index
              self.timestamp = timestamp
              self.data = data
              self.previous_hash = previous_hash
              self.hash = self.calculate_hash()
          
          def calculate_hash(self):
              block_string = f"{self.index}{self.timestamp}{self.data}{self.previous_hash}"
              return hashlib.sha256(block_string.encode()).hexdigest()
      
      blockchain = []
      
      def create_genesis_block():
          return Block(0, time.time(), "Genesis Block", "0")
      
      def next_block(last_block):
          index = last_block.index + 1
          timestamp = time.time()
          data = f"Block {index}"
          previous_hash = last_block.hash
          return Block(index, timestamp, data, previous_hash)
      
      blockchain.append(create_genesis_block())
      
      for i in range(1, 10):
          blockchain.append(next_block(blockchain[-1]))
      
      return blockchain
  
  def print_blockchain():
      blockchain = create_blockchain()
      for block in blockchain:
          print(f"Index: {block.index}, Timestamp: {block.timestamp}, Data: {block.data}, Previous Hash: {block.previous_hash}, Hash: {block.hash}")