input: Write a function to build a simple blockchain system in Python. The function should define a Block class and a function to create a blockchain by adding blocks based on a list of transactions. The function should also include a function to print the contents of the blockchain. The input parameter for the function should be a list of transactions. The function should return the complete blockchain with all added blocks.
  assert create_blockchain([{"index": 1, "timestamp": "2023-10-01 12:00:00", "data": {"transaction": "Alice to Bob", "amount": 10}, "previous_hash": "0"}, {"index": 2, "timestamp": "2023-10-01 12:00:10", "data": {"transaction": "Bob to Charlie", "amount": 5}, "previous_hash": "first_block_hash"}]).blocks[1].data=={"transaction": "Bob to Charlie", "amount": 5}
output: 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):
          return hash(f"{self.index}{self.timestamp}{self.data}{self.previous_hash}")
  
  class Blockchain:
      def __init__(self):
          self.blocks = []
  
      def add_block(self, block):
          if self.blocks:
              block.previous_hash = self.blocks[-1].hash
          block.hash = block.calculate_hash()
          self.blocks.append(block)
  
  def create_blockchain(transactions):
      blockchain = Blockchain()
      for transaction in transactions:
          block = Block(transaction["index"], transaction["timestamp"], transaction["data"], transaction["previous_hash"])
          blockchain.add_block(block)
      return blockchain