input: Write a function to implement a hash table in Python that supports insert, delete and retrieve operations. The class should be named `HashTable` and it should initialize an internal table of size 256 with empty lists. The `insert` method should insert a key-value pair into the table, updating the value if the key already exists. The `retrieve` method should return the value associated with the key or `None` if the key is not found. The `delete` method should remove the key-value pair from the table if the key exists. If the key does not exist, the method should do nothing.
  class HashTable:
      def __init__(self):
          self.table = [[] for _ in range(256)]
   
      def insert(self, key, value):
          h = hash(key) % 256
          for i, kv in enumerate(self.table[h]):
              if kv[0] == key:
                  self.table[h][i] = (key, value)
                  return
          self.table[h].append((key, value))
   
      def retrieve(self, key):
          h = hash(key) % 256
          for kv in self.table[h]:
              if kv[0] == key:
                  return kv[1]
   
      def delete(self, key):
          h = hash(key) % 256
          for i, kv in enumerate(self.table[h]):
              if kv[0] == key:
                  del self.table[h][i]
  
  assert HashTable().insert("a", 1) is None
  assert HashTable().retrieve("a") is None
  assert HashTable().delete("a") is None
  ht = HashTable()
  ht.insert("a", 1)
  assert ht.retrieve("a") == 1
  ht.delete("a")
  assert ht.retrieve("a") is None
output: class HashTable:
      def __init__(self):
          self.table = [[] for _ in range(256)]
   
      def insert(self, key, value):
          h = hash(key) % 256
          for i, kv in enumerate(self.table[h]):
              if kv[0] == key:
                  self.table[h][i] = (key, value)
                  return
          self.table[h].append((key, value))
   
      def retrieve(self, key):
          h = hash(key) % 256
          for kv in self.table[h]:
              if kv[0] == key:
                  return kv[1]
   
      def delete(self, key):
          h = hash(key) % 256
          for i, kv in enumerate(self.table[h]):
              if kv[0] == key:
                  del self.table[h][i]