Python/project_euler/problem_13/sol2.py
Animesh Singh 32d5c1a9b2 Project Euler Problem #13 Python Solution (#935)
* Create text file for numbers

* Create sol2.py

* Pythonic version of Problem #16 solution

* Update sol2.py

* Valid Python code for Python version 2-3

* Update sol2.py
2019-07-09 00:58:58 +08:00

6 lines
104 B
Python

sum = 0
with open("num.txt",'r') as f:
for line in f:
sum += int(line)
print(str(sum)[:10])