diff --git a/diy.py b/diy.py index a957d4c..1628315 100644 --- a/diy.py +++ b/diy.py @@ -1,4 +1,4 @@ - +g=0 with open(r'c:\Users\EDZ\Documents\lesson13-1\sales_list.txt','r',encoding='utf-8') as a: for i in a.readlines(): i=i.split() @@ -6,4 +6,6 @@ with open(r'c:\Users\EDZ\Documents\lesson13-1\sales_list.txt','r',encoding='utf- s=0 for j in i[1:]: s += int(j) - print(s) \ No newline at end of file + print(s) + g+=s + print(g) \ No newline at end of file