def sort_tools_by_toolbox(self):
    self.sorted_tools = [[] for i in range(len(self.lower_toolboxes))]
    count = 1
    for toolAndToolbox in self.tools_and_toolboxes.split('\n'):
        if toolAndToolbox.strip():
            tool = toolAndToolbox.strip().split(':')[0].strip().replace('TIN', 'Tin').replace('KS', 'Ks').replace('FD', 'Fd')
            itemToolbox = toolAndToolbox.strip().split(':')[1].strip()
            index = 0
            for toolbox in self.lower_toolboxes:
                if (toolbox == itemToolbox):
                    self.sorted_tools[index].append(tool)
                    break
                index = (index + 1)
            count = (count + 1)
def sort_tools_by_toolbox(self):
    self.sorted_tools = [[] for i in range(len(self.lower_toolboxes))]
    count = 1
    for toolAndToolbox in self.tools_and_toolboxes.split('\n'):
        if toolAndToolbox.strip():
            tool = toolAndToolbox.strip().split(':')[0].strip().replace('TIN', 'Tin').replace('KS', 'Ks').replace('FD', 'Fd')
            itemToolbox = toolAndToolbox.strip().split(':')[1].strip()
            index = 0
            for toolbox in self.lower_toolboxes:
                if (toolbox == itemToolbox):
                    self.sorted_tools[index].append(tool)
                    break
                index = (index + 1)
            count = (count + 1)