day4/python: fix last passport not being read
This commit is contained in:
parent
b911869704
commit
49192977f4
1 changed files with 3 additions and 0 deletions
|
@ -44,6 +44,9 @@ def split_on(f, it):
|
||||||
else:
|
else:
|
||||||
current_part.append(el)
|
current_part.append(el)
|
||||||
|
|
||||||
|
if current_part != []:
|
||||||
|
yield current_part
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
with open('input.txt', 'r') as f:
|
with open('input.txt', 'r') as f:
|
||||||
lines = [line.strip() for line in f.readlines()]
|
lines = [line.strip() for line in f.readlines()]
|
||||||
|
|
Loading…
Reference in a new issue