Commit bcf2b24a by BellCodeEditor

save project

parent af406c84
Showing with 12 additions and 0 deletions
d=""
file=open(r'c:\Users\MAKCOO\Desktop\我是朱xx.txt','r',encoding='utf-8')
a=file.readlines()
for i in a:
date=i.split()
sum=0
for s in date[1:]:
sum=sum+int(s)
d+=date[0]+str(sum)+"\n"
with open(r'c:\Users\MAKCOO\Desktop\我是朱xx.txt','w',encoding='utf-8')as file1:
file1.write(d)
\ 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