minor cleanup

This commit is contained in:
a 2020-12-09 02:16:20 -06:00
parent 0887dc6904
commit 30049c7d4b

View file

@ -3,7 +3,7 @@ def read_file():
return list(map(int, f.read().split('\n'))) return list(map(int, f.read().split('\n')))
def has_summing_pair(target, numbers): def has_summing_pair(target, numbers):
for _, number in enumerate(numbers): for number in numbers:
if target - number in numbers: if target - number in numbers:
return True return True
return False return False
@ -19,7 +19,7 @@ def part1(numbers):
def find_contiguous_sum(target, numbers): def find_contiguous_sum(target, numbers):
start = 0 start = 0
end = 0 end = 0
for i, number in enumerate(numbers): for i, _ in enumerate(numbers):
start = i start = i
n = i n = i
s = target s = target