Skip to content

Commit e8c6745

Browse files
committed
Fix input reading to strip out newlines
1 parent 23596d2 commit e8c6745

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def read_input(day, transformer=str, example=False):
1616
else:
1717
filename = f'day_{day}.txt'
1818
with open(os.path.join('..', 'inputs', filename)) as input_file:
19-
return [transformer(line) for line in input_file]
19+
return [transformer(line.strip()) for line in input_file]
2020
except FileNotFoundError as e:
2121
print(e)
2222
sys.exit(1)

0 commit comments

Comments
 (0)