Commit a8bb2b8c by BellCodeEditor

save project

parent c9be67bf
Showing with 8 additions and 3 deletions
with open(r'c:\Users\周\Desktop\q.txt','r',encoding='utf-8') as a:
with open(r'C:\Users\周\Desktop\a.txt','r',encoding='utf-8') as a:
aa=a.readlines()
print(aa)
\ No newline at end of file
for a in aa:
a=a.split()
q=0
for i in a[1:]:
q=q+int(i)
print(a[0]+str(q))
\ 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