diff --git a/1-two-sum/1-two-sum.py b/1-two-sum/1-two-sum.py index def56b1..3e543b6 100644 --- a/1-two-sum/1-two-sum.py +++ b/1-two-sum/1-two-sum.py @@ -5,8 +5,7 @@ class Solution(object): :type target: int :rtype: List[int] """ - length = len(nums) - for i in range(length): - for j in range(i + 1, length): + for i in range(len(nums)): + for j in range(i + 1, len(nums)): if nums[i] + nums[j] == target: return [i, j] \ No newline at end of file