Python constructor and default value
Python constructor and default value Question: Somehow, in the Node class below, the wordList and adjacencyList variable is shared between all instances of Node. >>> class Node: … def __init__(self, wordList = [], adjacencyList = []): … self.wordList = wordList … self.adjacencyList = adjacencyList … >>> a = Node() >>> b = Node() >>> a.wordList.append(“hahaha”) …