This is an easy problem. Just follow the arithmetic rules and be careful of the carry.

```
class Solution(object):
def plusOne(self, digits):
"""
:type digits: List[int]
:rtype: List[int]
"""
n = len(digits)
i = n-1
carry = 1
while i>=0 and carry!=0:
digits[i], carry = (digits[i]+carry)%10, (digits[i]+carry)//10
i -= 1
if i<0 and carry!=0:
digits.insert(0, carry)
return digits
```