4 lines
111 B
Python
4 lines
111 B
Python
|
G
|
with open('nums.txt', 'r') as f:
|
||
|
|
total = sum(int(line.strip()) for line in f if line.strip())
|
||
|
|
print(total)
|