(self, nums, target)
| 43 | |
| 44 | class Solution(object): |
| 45 | def twoSum(self, nums, target): |
| 46 | |
| 47 | result = self._twoSum(nums, target) |
| 48 | a = nums.index(result[0]) |
| 49 | # b = nums.index(result[-1], a+1) |
| 50 | for i in range(len(nums)-1, -1, -1): |
| 51 | if nums[i] == result[1]: |
| 52 | return [a, i] |
| 53 | # b = i |
| 54 | # break |
| 55 | # return [a, b] |
| 56 | |
| 57 | |
| 58 | def _twoSum(self, nums, target): |