class Solution(object): def getSum(self, a, b): """ :type a: int :type b: int :rtype: int """ list=[a,b] return sum(list)
Is this legal? not sure if the 'sum' operator will be considered as another form of '+'....
@terryli Hi,man,why don't you use sum(a,b)??perhaps it's illega as sum contains operator '+'.
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.