def add(self, num1, num2):
        """
        :param num1: list of digits in reverse order
        :param num2: list of digits in reverse order
        :return: list of digits in reverse order
        """
        num1 = list(num1)  # NOTICE: local copy
        num2 = list(num2)  # NOTICE: local copy
        if len(num1) < len(num2):
            num1, num2 = num2, num1

        carry = 0
        for ind in range(len(num1)):  # longer one
            try:
                result = num1[ind]+num2[ind]+carry
            except __HOLE__:
                result = num1[ind]+carry
                if result == num1[ind]: break  # prune

            carry = result/10
            num1[ind] = result%10

        if carry != 0:
            num1.append(carry)

        return num1
dataset/ETHPy150Open algorhythms/LeetCode/042 Multiply Strings.py/Solution.add