old_contents: class Solution:
      # @param {integer[]} nums
      # @param {integer} target
      # @return {integer[]}
      def twoSum(self, nums, target):
          if not nums: return []
          d = {}
          for i,num in enumerate(nums):
              if target-num in d:
                  return [d[target-num]+1,i+1]
              d[num] = i
new_contents: class Solution(object):
      def twoSum(self, nums, target):
          """
          :type nums: List[int]
          :type target: int
          :rtype: List[int]
          """
          d = {}
          for i, n in enumerate(nums):
              if target-n in d:
                  return [d[target-n], i + 1]
              else:
                  d[n] = i + 1
  
subject: Update leetcode.001.TwoSum.py