class Solution:
    def twoSum(self, nums: List[int], target: int) -> List[int]:
        numDict = {}
        for i, num in enumerate(nums):
            if(num in numDict and i!=numDict[num]):
                return [i, numDict[num]]
            else:
                numDict[target - num] = i
815c4cffd9f013130dc7ce4926737edaafdb5a84
<mask token>

class Solution:
    <mask token>

class Solution:

    def twoSum(self, nums: List[int], target: int) ->List[int]:
        numDict = {}
        for i, num in enumerate(nums):
            if num in numDict and i != numDict[num]:
                return [i, numDict[num]]
            else:
                numDict[target - num] = i

class Solution:
    def twoSum(self, nums: List[int], target: int) -> List[int]:
        numDict = {}
        for i, num in enumerate(nums):
            if(num in numDict and i!=numDict[num]):
                return [i, numDict[num]]
            else:
                numDict[target - num] = i