advent-of-code/2018/day-01/01-list-sum.py

11 lines
184 B
Python
Raw Normal View History

2018-12-02 02:04:55 +01:00
#!/usr/bin/env python3
with open('input.txt', 'r') as f:
in_list = f.readlines()
in_list = [x.strip() for x in in_list]
in_list = [int(x) for x in in_list]
print(sum(in_list))