0

How to sum the numbers from a text file?

i created a function which fills an text file from 1-100 now I want to read and sum these numbers but how?

5th Jun 2017, 4:44 PM
lars
3 Respuestas
+ 6
No problem. As you can see the remaining part was pretty much analogical to the one you wrote yourself. Just the other way round ;) If you want, you can also use the 'pickle' module to safely save and load even the most complicated datatypes, like objects, nested dictionaries and lists and so on https://code.sololearn.com/cNXRdhIOg17U/
5th Jun 2017, 6:44 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 5
You are half-way there :) I took your code and added some lines to it. Take a look: https://code.sololearn.com/cp3P7QgsD412/
5th Jun 2017, 6:35 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 1
Great it works now! Thank you very much!
5th Jun 2017, 6:37 PM
lars