From 23e5f473c0aa6260ad1bf11fd75584a78c7bd75d Mon Sep 17 00:00:00 2001 From: Xiretza Date: Fri, 4 Dec 2020 15:39:48 +0100 Subject: [PATCH] day4/python: fix last passport not being read --- 2020/day4/day4.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/2020/day4/day4.py b/2020/day4/day4.py index 4571982..208064f 100755 --- a/2020/day4/day4.py +++ b/2020/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()]