Commit cb59cf6e by BellCodeEditor

save project

parent 880a55e7
Showing with 8 additions and 5 deletions
...@@ -2,7 +2,10 @@ with open(r"c:\Users\23636\Documents\lesson13-1\sales_list.txt","r",encoding="ut ...@@ -2,7 +2,10 @@ with open(r"c:\Users\23636\Documents\lesson13-1\sales_list.txt","r",encoding="ut
a=file1.readlines() a=file1.readlines()
for i in a: for i in a:
d=i.split() d=i.split()
print(d[0]) #print(d[0])
for i in a: #print(d[1:])
d=i.split() s=0
print(d[1:]) for r in d[1:]:
\ No newline at end of file s=s+int(r)
sb=d[0]+str(s)
print(sb)
\ 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