Commit c395bce1 by BellCodeEditor

save project

parent 1678d02a
Showing with 7 additions and 2 deletions
with open(r'C:\Users\zhang\Documents\lesson13-1\sales_list.txt','r',encoding='utf-8') as d:
a=d.readlines()
for i in a:
print(i)
\ No newline at end of file
d=i.split()
s=0
for g in d[1:]:
s+=int(g)
z=d[0]+str(s)
print(z)
\ 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