class Solution(object):
def twoSum(self, nums, target):
"""
:type nums: List[int]
:type target: int
:rtype: List[int]
"""
myDict = {}
for i,t in enumerate(nums):
myDict[nums[i]] = i
for i,t in enumerate(nums):
tmp = target - t
if myDict.get(tmp)!=None and myDict.get(tmp)!=i:
return [i,myDict.get(tmp)]