Commit e6592809 by BellCodeEditor

auto save

parent 0cc37ad4
Showing with 11 additions and 0 deletions
#'c:\Users\Administrator\Documents\lesson13-1\sales_list.txt'
with open(r'c:\Users\Administrator\Documents\lesson13-1\sales_list.txt','r',encoding='utf_8') as file:
a = file.readlines()
for i in a:
data = i.split()
a = 0
for sales in data[1:]:
a += int(sales)
b = data[0]+str(a)
print(b)
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
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