Commit 8f2a1c5c by BellCodeEditor

save project

parent 76f0346e
Showing with 996 additions and 2 deletions
...@@ -2,4 +2,999 @@ with open (r"c:\Users\Windows 10\Documents\lesson13-1\sales_list.txt","r",encodi ...@@ -2,4 +2,999 @@ with open (r"c:\Users\Windows 10\Documents\lesson13-1\sales_list.txt","r",encodi
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)
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