class py_solution:
def twoSum(self, nums, target):
lookup = {}
for i, num in enumerate(nums):
if target - num in lookup:
return (lookup[target - num] + , i + )
lookup[num] = i #{10:2,20:1}
print("index1=%d, index2=%d" % py_solution().twoSum((,,,,,,),))
05-13 04:51