Commit 835d70b9 by BellCodeEditor

save project

parent f45429f2
Showing with 6 additions and 3 deletions
...@@ -2,5 +2,8 @@ with open(r'C:\Users\makcoo\Documents\lesson13-1\sales_list.txt',"r",encoding="u ...@@ -2,5 +2,8 @@ with open(r'C:\Users\makcoo\Documents\lesson13-1\sales_list.txt',"r",encoding="u
s=file1.readlines() s=file1.readlines()
for i in s: for i in s:
sss=i.split() sss=i.split()
print(sss[1:]) #print(sss[1:])
sum=0
\ No newline at end of file for sales in sss[1:]:
sum+=int(sales)
result=sss[0]+str(sum)
\ 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