Commit 29c2cd27 by BellCodeEditor

save project

parent e20ce212
Showing with 1 additions and 0 deletions
with open(r'c:\Users\邓美玲\Documents\lesson13-1\sales_list.txt','r',encoding='utf-8') as file: with open(r'c:\Users\邓美玲\Documents\lesson13-1\sales_list.txt','r',encoding='utf-8') as file:
a = file.readlines() a = file.readlines()
final_sum=[]
for i in a: for i in a:
data=i.split() #把字符串切分成更细的一个个的字符串 data=i.split() #把字符串切分成更细的一个个的字符串
sum=0 #先把总钱数设为0 sum=0 #先把总钱数设为0
......
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