Python eval method


  • 0
    L
    class Solution:
        def addStrings(self, num1, num2):
            self.num1 = eval(num1)
            self.num2 = eval(num2)
            return str(self.num1 + self.num2)
    

Log in to reply
 

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