Commit 608bc785 by BellCodeEditor

save project

parent 33b35e03
Showing with 8 additions and 3 deletions
......@@ -2,5 +2,11 @@ with open(r"c:\Users\丽达2号\Documents\lesson13-1\sales_list.txt","r",encodin
q=renyifei.readlines()
for i in q:
a=i.split()
print(a[0])
print(a[1:])
\ No newline at end of file
sum=0
for sales in a[1:]:
sum+= int(sales)
c=a[0]+str(sum)
print(c)
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