Python two solutions: type conversion and normal mod
\nclass Solution:\n    def addToArrayForm(self, A: \'List[int]\', K: \'int\') -> \'List[int]\':\n        """\n        Method 1, convert A to an integer first, d
```\nclass Solution:\n    def addToArrayForm(self, A: \'List[int]\', K: \'int\') -> \'List[int]\':\n        """\n        Method 1, convert A to an integer first, do the addition, finally             convert to list\n        """\n        def list2int(l):\n            s = list(map(str, l))\n            s = \'\'.join(s)\n            return int(s)\n        \n        def int2list(i):\n            s = str(i)\n            return list(map(int, s))\n        \n        return int2list(list2int(A) + K)\n    \n        """\n        Method 2, Schoolbook Addition\n        """\n        for i in range(len(A) - 1, -1, -1):\n            # Option 1: vanilla way to deal with remainder and quotient\n            # K, A[i] =(A[i] + K) // 10, (A[i] + K) % 10\n            # Option 2: use divmod()\n            K, A[i] = divmod(A[i] + K, 10)\n        \n        # If K still has value, unshift it from head\n        return list(map(int, str(K))) + A if K else A\n        \n```
[]