Commit 18509b2d by BellCodeEditor

save project

parent 9b9947fd
Showing with 5 additions and 2 deletions
with open(r'C:\Users\maku\Desktop\新建文本文档.txt','r',encoding='utf-8') as q:
a=q.readlines()
u=[]
for i in a:
p=i.split()
#print(a[0])
......@@ -8,4 +9,6 @@ for i in a:
s=s+int(o)
d=p[0]+str(s)
print(d)
\ No newline at end of file
u.append(d)
with open(r'C:\Users\maku\Desktop\新建文本文档.txt','a',encoding='utf-8') as q:
q.writelines(u)
\ 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