Commit 0e4c1215 by BellCodeEditor

save project

parent 555dbf93
Showing with 3 additions and 12 deletions
with open(r"c:\Users\我的电脑\Documents\lesson13-1\sales_list.txt","r",encoding="utf-8")as dsa: with open (r"c:\Users\我的电脑\Documents\lesson13-4\sales_list.txt",'r',encoding='utf-8')as file:
a=dsa.readlines() a=file.readlines()
#print(a) for i in a:
for i in a :
print(i) print(i)
tata=i.split()
# print(tata[0])
# print(tata[1:])
sun=0
for g in tata[1:]:
sun=sun+int(g)
print(sun)
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