class Node:

    def __init__(self):
        self.name = ''
        self.weight = 0
        self.code = ''

    def initSet(self, name, weight):
        self.name = name
        self.weight = weight

Initialize and declare class Node
Initialize and declare class Node
