Commit 054e1542 by BellCodeEditor

save project

parent 2e7fd932
Showing with 16 additions and 0 deletions
with open("sales_list.txt",'r',encoding="utf-8")as bianbian:
bianbian2=bianbian.readlines()
#print(bianbian2)
for i in bianbian2:
date=i.split()
sum=0
for sales in date[1:]:
sum=sum+int(sales)
reuslt=date[0]+str(sum)
print(reuslt)
\ No newline at end of file
s
new_s=s.split(",")#默认空格分隔
print(s)
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