#!/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))