Commit 5bb6dbde by BellCodeEditor

save project

parent 3418bb4b
Showing with 5 additions and 1 deletions
......@@ -2,5 +2,9 @@ with open(r"C:\Users\MY-PC\Documents\lesson13-1\sales_list.txt","r",encoding="UT
a=file.readlines()
for i in a:
x=i.split()
print(x[1:])
data=x[1:]
sum=0
for i in data:
sum+=int(i)
print(x[0]+str(sum))
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