Commit 2b93b275 by BellCodeEditor

save project

parent 3006ebdd
Showing with 9 additions and 4 deletions
......@@ -2,10 +2,15 @@ with open(r'c:\Users\xingzi\Documents\lesson13-1\sales_list.txt','r',encoding='u
a =file1.readlines()
for i in a:
l=i.split(",")
print(l[1:])
as file :
a=file.readlines()
for i in a:
data=1.split()
sum=0
for sales in data[1:]
sum=sum+int(sales)
result=data[0]+str(sum)
print(sum)
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