class Solution:
    # @return a tuple, (index1, index2)
    def twoSum(self, num, target):
        seen = {}
        for i in range(len(num)):
            res = target -num[i]
            if res not in seen:
                seen[num[i]] = i+1
            else:
                return seen[res], i+1
                
                
        
a91adf290626f681c8e66cacd38424123c98d18b
<mask token>

class Solution:
    <mask token>

class Solution:

    def twoSum(self, num, target):
        seen = {}
        for i in range(len(num)):
            res = target - num[i]
            if res not in seen:
                seen[num[i]] = i + 1
            else:
                return seen[res], i + 1

class Solution:
    # @return a tuple, (index1, index2)
    def twoSum(self, num, target):
        seen = {}
        for i in range(len(num)):
            res = target -num[i]
            if res not in seen:
                seen[num[i]] = i+1
            else:
                return seen[res], i+1
                
                
        