Commit b570239b by BellCodeEditor

save project

parent bcf07e69
Showing with 6 additions and 4 deletions
...@@ -2,6 +2,8 @@ with open(r"c:\Users\EDY\Documents\lesson13-4\sales_list.txt","r",encoding="utf_ ...@@ -2,6 +2,8 @@ with open(r"c:\Users\EDY\Documents\lesson13-4\sales_list.txt","r",encoding="utf_
b=a.readlines() b=a.readlines()
for i in b: for i in b:
data=i.split() data=i.split()
print(data[0]) sum=0
print(data[1:]) for j in data[1:]:
for sum=sum+int(j)
\ No newline at end of file s=data[0]+str(sum)
print(s)
\ 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