mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-21 20:47:10 +08:00
* 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
This commit is contained in:
5
project_euler/problem_13/sol2.py
Normal file
5
project_euler/problem_13/sol2.py
Normal file
@ -0,0 +1,5 @@
|
||||
sum = 0
|
||||
with open("num.txt",'r') as f:
|
||||
for line in f:
|
||||
sum += int(line)
|
||||
print(str(sum)[:10])
|
Reference in New Issue
Block a user