Commit 03c4037e by BellCodeEditor

save project

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