One caveat we should note is that it's possible to pass a key that doesn't exist (or has not been set), so we should handle that by returning undefined or None if that's the case.
1def get(self, key):
2 key_hash = self.hashStr(key)
3 index = self.position(key_hash)
4
5 if not self.storage[index]:
6 return None
7 else:
8 list_at_index = self.storage[index]
9 for i in self.storage[index]:
10 if i.key == key:
11 return i.value
12 return None