Commit d13308f9 by BellCodeEditor

save project

parent 5ec53ebb
Showing with 11 additions and 0 deletions
with open(r'c:\Users\Administrator\Desktop\sales_list.txt','r',encoding='UTF-8') as f:
a=f.readlines()
# print(a)
for i in a:
s = i.split()
sum = 0
for j in s[1:]:
sum = sum + int(j)
A=s[0] + str(sum)
print(A)
\ 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