class Solution:
def twoSum(self, nums: List[int], target: int) -> List[int]:
key_dict = {}
for idx, num in enumerate(nums):
if target-num in key_dict:
# print("[{},{}]".format(key_dict[num], idx))
# result.append(key_dict[num])
# result.append(idx)
return [key_dict[target-num],idx]
key_dict[num] = idx
return []