Commit 932a0458 by BellCodeEditor

save project

parent 334e3600
Showing with 11 additions and 3 deletions
......@@ -6,5 +6,14 @@ with open(r'c:\Users\Administrator\Desktop\新建文本文档.txt','r',encoding=
for i in a:
#print(i)
c = i.split()
print(c[1:])
print()
\ No newline at end of file
#print(c[1:])
#print()
sum = 0
for q in c[1:]:
sum += int(q)
d = c[0]+str(sum)
print(d)
with open(r'c:\Users\Administrator\Desktop\新建文本文档.txt','a',encoding='utf-8') as file:
file.writelines(d)
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