Here is my code for this problem:

```
class Solution:
def twoSum(self, nums, target):
"""
:type nums: List[int]
:type target: int
:rtype: List[int]
"""
i=0
j=1
while i<=len(nums)-1:
while j<=len(nums):
if nums[i]+nums[j]==target:
return i,j
else:
j+=1
i+=1
```

How can I fix this?