Commit ae7da0c7 by BellCodeEditor

save project

parent 86a699dd
Showing with 9 additions and 2 deletions
with open(r'c:\Users\玛酷H3\Desktop\diy1.py.txt','r',encoding='utf-8') as nb:
print(nb)
\ No newline at end of file
a=nb.readlines()
for i in a:
da=i.split()
sum=0
for s in da[1:]:
sum=sum+int(s)
rs=da[0]+str(sum)
print(rs)
\ 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