Commit 7fb61303 by BellCodeEditor

save project

parent 1a2714f5
Showing with 12 additions and 0 deletions
with open(r'C:\Users\Administrator\Desktop\demo.txt','r',encoding'utf=8') as sb:
a=sb.readlines()
for i in a:
date=i.split()
sum=0
for sales in date[1:]
sum=sum+int(sales)
result=date[0]+str(sum)
print(result)
with open(r'C:\Users\Administrator\Desktop\demo.txt','a',encoding'utf=8') as sb:
file.writelines()
\ No newline at end of file
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