Commit 4bcad55f by BellCodeEditor

auto save

parent e2f475c1
Showing with 9 additions and 6 deletions
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:
for s in a:
b=0
i_1=i.split()
#print(i_1[1:])
for k in i_1[1:]:
s_1=s.split()
#print(s_1[1:])
for k in s_1[1:]:
b+=int(k)
print(b)
\ No newline at end of file
#print(b)
sb=s_1[0]+str(b)
print(sb)
\ 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