Commit 36a3cdc7 by BellCodeEditor

save project

parent 71d5ae53
Showing with 8 additions and 3 deletions
with open(r"C:\Users\Administrator\Desktop\新建文本文档.txt",'r',encoding='utf-8') as f:
a=f.readlines()
ff=[]
for i in a:
d=i.split()
print(d[0])
print(d[1:])
\ No newline at end of file
for s in d[1:]:
sm=sm+int(s)
r=d+str(sm)
ff.append(r)
print(r)
with open(r"C:\Users\Administrator\Desktop\新建文本文档.txt",'r',encoding='utf-8') as g:
g.writelines(ff)lp.l,
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