My two lines python solution


  • 0
    I
    def plusOne(self, digits):
        num = int("".join([str(i) for i in digits])) + 1
        return [int(i) for i in str(num)]

Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.