Commit 0fd690b4 by BellCodeEditor

save project

parent d4c7214e
Showing with 6 additions and 3 deletions
reh=[]
with open(r'c:\Users\饮水思源\Desktop\qw','r',encoding='utf-8') as li:
a=li.readlines()
for i in a:
......@@ -5,5 +6,7 @@ with open(r'c:\Users\饮水思源\Desktop\qw','r',encoding='utf-8') as li:
sum=0
for j in data[1:]:
sum+=int(j)
huu=data[0]+str(sum)
print(huu)
\ No newline at end of file
huu=data[0]+str(sum)+'\n'
reh.append(huu)
with open(r'c:\Users\饮水思源\Desktop\oow','a',encoding='utf-8') as ll:
ll.writelines(reh)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment