LearnPy Hub
← File Handling problems
Easy

Sum From a File

Read a line of integers and write each to nums.txt on its own line. Then read the file back and print the sum.

Input

One line of integers.

Output

The sum.

Sample 1

Input
1 2 3
Output
6

Sample 2

Input
10
Output
10
solution.py
Output appears here
Sum From a File · Python practice problem · LearnPy Hub