class Solution(object):
    def twoSum(self, nums, target):
        """
        :type nums: List[int]
        :type target: int
        :rtype: List[int]
        """
        my_dict = {}
        for idx, value in enumerate(nums):
            remainder = target - value
            if remainder in my_dict:
                return [idx, my_dict.get(remainder)]
            else:
                my_dict[value] = idx