This is the first time I code on LeetCode. The solution is accepted,but I think the method is not that good.

```
class Solution(object):
def twoSum(self, nums, target):
"""
:type nums: List[int]
:type target: int
:rtype: List[int]
"""
for i in range(len(nums)):
tempVal = target - nums[i]
for j in range(i+1,len(nums)):
if tempVal == nums[j]:
x = i
y = j
return x,y
```

thx. :)