title: TypeError: list indices must be integers or slices, not NoneType
body: <p>I have some troubles with the <code>Type Error (TypeError: list indices must be integers or slices, not NoneType)</code></p>
  
  <p>I just want to do a little hash table with linear probing in python. Therefore I used to make an insert method, a find method and a hash method so far. I have problems with my insert method.
  This is my code</p>
  
  <pre><code>    def insert(self, key):
  
          index = self.hash(key)
          count = 0
          if self.table[index] == None or self.table[index].getValue() == "DELETED":
              self.table[index] = key
              return count + 1
          else:
              inserted = False
              while inserted != True:
                  index += 1
                  count += 1
                  if index == self.size:
                      index = 0
                  if self.table[index] == None or self.table[index].getValue() == "DELETED":
                      self.table[index] = key
                      return count
  </code></pre>
  
  <p>The problem are these two lines</p>
  
  <p><code>if self.table[index] == None or self.table[index].getValue() == "DELETED":</code></p>
  
  <p>What should I do?
  I need to compare my table index with None.
  Has anybody an idea?</p>