def twonums(nums,target):
hashmap=dict()
for i in range(len(nums)):
if hashmap.get(target-nums[i]) is None:
hashmap[nums[i]]=i
else:
return [hashmap.get(target-nums[i]),i]
if __name__=='__main__':
nums=[4,3,7,9]
n=twonums(nums,11)
print(n)