Dear all,

Why do I get a type error: ‘list’ object cannot be interpreted as an integer with the following code:

```
from linked_list import Node, LinkedList
from blossom_lib import flower_definitions
class HashMap():
def __init__(self, size):
self.array_size = size
self.array = [LinkedList() for number in range(size)]#???
def hash(self, key):
return sum(key.encode())
def compress(self, hash_code):
return hash_code % self.array_size
def assign(self, key, value):
array_index=self.compress(self.hash(key))
payload = Node([key, value])
#self.array[array_index] = [key, value]
list_at_array = self.array[array_index]
for node in list_at_array:
if node.value[0] == key:
node.value[1] = value
list_at_array.insert(payload)
def retrieve(self, key):
array_index = self.compress(self.hash(key))
list_at_index = self.array[array_index]
for node in list_at_index:
if node.value[0] == key:
return node.value[1]
else:
return None
if payload[0] == key:
return payload[1]
elif payload[0] == None or payload[0] !=key:
return None
blossom = HashMap(flower_definitions)
```