minor cleanup
This commit is contained in:
parent
0887dc6904
commit
30049c7d4b
1 changed files with 2 additions and 2 deletions
4
09/09.py
4
09/09.py
|
@ -3,7 +3,7 @@ def read_file():
|
|||
return list(map(int, f.read().split('\n')))
|
||||
|
||||
def has_summing_pair(target, numbers):
|
||||
for _, number in enumerate(numbers):
|
||||
for number in numbers:
|
||||
if target - number in numbers:
|
||||
return True
|
||||
return False
|
||||
|
@ -19,7 +19,7 @@ def part1(numbers):
|
|||
def find_contiguous_sum(target, numbers):
|
||||
start = 0
|
||||
end = 0
|
||||
for i, number in enumerate(numbers):
|
||||
for i, _ in enumerate(numbers):
|
||||
start = i
|
||||
n = i
|
||||
s = target
|
||||
|
|
Loading…
Reference in a new issue