Commit 58df8c93 by BellCodeEditor

save project

parent e6eae63f
Showing with 6 additions and 5 deletions
......@@ -2,14 +2,15 @@ with open(r'c:\Users\鲍\Desktop\145.txt','r',encoding='utf-8') as b:
a=b.readlines()
#print(a)
#file.colse()
c=[]
for i in a:
i=i.split()
# print(i)
sum=0
c.append()
for l in i[1:]:
sum=sum+int(l)
guil=i[0]+str(sum)
# print(i[0]+str(sum))
with open(r'C:\Users\鲍\Desktop','w',encoding='utf-8') as file:
file=writelines(guil)
\ No newline at end of file
c.append(guil)# print(i[0]+str(sum))
with open(r'c:\Users\鲍\Desktop\145.txt','a',encoding='utf-8') as b:
b.writelines(c)
\ 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