0
How to write a program which fills a text file with numbers from 1-100 among each other?
my code makes the side by side and without empty lines. What am I doing wrong? *\n doesn't work in this case
3 Antworten
+ 6
Show the code so people can see what might be wrong with it :)
+ 1
Thank you but I guess I've got it:
Dataname = 'E:/Textdoc.txt'
List = []
for i in range (0,100):
List.append ('%2d \n'% (i)
f=open (Dataname,'w')
f.writelines (List)
f.close ()
0
now I want to sum all of these numbers from the textdata and cant find it on google