Commit c7feb910 by BellCodeEditor

save project

parent cc4ffa29
Showing with 5 additions and 3 deletions
g=0
with open(r'c:\Users\EDZ\Documents\lesson13-1\sales_list.txt','r',encoding='utf-8') as a: with open(r'c:\Users\EDZ\Documents\lesson13-1\sales_list.txt','r',encoding='utf-8') as a:
for i in a.readlines(): for i in a.readlines():
i=i.split() i=i.split()
...@@ -6,4 +6,6 @@ with open(r'c:\Users\EDZ\Documents\lesson13-1\sales_list.txt','r',encoding='utf- ...@@ -6,4 +6,6 @@ with open(r'c:\Users\EDZ\Documents\lesson13-1\sales_list.txt','r',encoding='utf-
s=0 s=0
for j in i[1:]: for j in i[1:]:
s += int(j) s += int(j)
print(s) print(s)
\ No newline at end of file g+=s
print(g)
\ 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