Commit 018607cb by BellCodeEditor

save project

parent 0cc37ad4
Showing with 13 additions and 0 deletions
a=open(r'c:\Users\LX\Desktop\sales_list.txt','r',encoding='utf-8')
b=a.readlines()
for i in b:
data=i.split()
#print(data[0])
#print(data[1:])
sam=0
for c in data[1:]:
sam=sam+int(c)
d=data[0]+str(sam)
print(d)
a.close()
\ 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