Commit 56e2a82f by BellCodeEditor

auto save

parent d1536a55
Showing with 15 additions and 0 deletions
with open(r'C:\Users\maku\Desktop\zxcvbnm.txt','r',encoding='utf-8')as file:
sb=file.readlines()
see=[]
for kun in sb:
k=kun.split()
# print(k[0])
hei=0
for i in k[1:]:
hei=hei+int(i)
b=k[0]+' '+str(hei)+'\n'
see.append(b)
with open(r'C:\Users\maku\Desktop\zxcvbnm.txt','w',encoding='utf-8')as file:
file.lines(see)
#print(see)
\ 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