I am trying to initialize a list in a class like this:
class Node():
def __init__(self):
self.info = None
self.word = ''
for i in range(256):
self.ptrs[0] = None
if __name__ == '__main__':
n = Node()
Now this throws an error
self.ptrs[0] = None
AttributeError: Node instance has no attribute 'ptrs'
I am sure that I'm missing something stupid. What is it?