Commit 35214e63 by BellCodeEditor

auto save

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