diff --git a/day4/day4.py b/day4/day4.py index 4571982..208064f 100755 --- a/day4/day4.py +++ b/day4/day4.py @@ -44,6 +44,9 @@ def split_on(f, it): else: current_part.append(el) + if current_part != []: + yield current_part + if __name__ == '__main__': with open('input.txt', 'r') as f: lines = [line.strip() for line in f.readlines()]