Commit 8012b564 by BellCodeEditor

save project

parent f6b7ff62
Showing with 16 additions and 0 deletions
with open(r'c:\Users\鲍\Desktop\145.txt','r',encoding='utf-8') as b:
a=b.readlines()
#print(a)
#file.colse()
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
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