Commit 9bd432f1 by BellCodeEditor

save project

parent 5fb20c0b
Showing with 8 additions and 4 deletions
with open("sales_list.txt",'r',encoding='utf=8') as f1: with open("sales_list.txt",'r',encoding='utf=8') as f1:
nr = f1.readlines() nr = f1.readlines()
for i in nr: for i in nr:
data = i.split()
print(i) sum = 0
\ No newline at end of file for s in data[1:]:
sum = sum + int(s)
jg = data[0] + str(sum)
print(jg)
\ 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