def flatten(self, input_list):
    output_list = []
    for i in input_list:
        if isinstance(i, list):
            output_list.extend(self.flatten(i))
        else:
            output_list.append(i)
    return output_list
def flatten(self, input_list):
    output_list = []
    for i in input_list:
        if isinstance(i, list):
            output_list.extend(self.flatten(i))
        else:
            output_list.append(i)
    return output_list