Commit 37dbe607 by BellCodeEditor

save project

parent a8285c23
Showing with 9 additions and 2 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:
print(i.split()[0])
print(i.split()[1:])
b=i.split()[1:]
c=0
for j in b:
c+=int(j)
print(i.split()[0]+str(c))
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