Untitled

mail@pastecode.io avatar
unknown
python
2 years ago
228 B
2
Indexable
Never
def addStrings(self, num1: str, num2: str) -> str:
        s1, s2 = 0, 0
        for i in num1:
            s1 = s1*10 + int(i)
        for i in num2:
            s2 = s2*10 + int(i)
        res = str(s1 + s2)
        return res