Commit c844c53f by BellCodeEditor

save project

parent d2fdc55e
Showing with 235 additions and 6 deletions
with open(r'c:\Users\Administrator\Documents\lesson13-1\sales_list.txt','r',encoding='utf-8') as file: with open(r'c:\Users\Administrator\Documents\lesson13-1\sales_list.txt','r',encoding='utf-8') as file:
a=file.readlines() a=file.readlines()
#print(a) for i in a:
for i in a: #print(i)
b=i.split() sum=0
print(b[1:]) b=i.split()
for a in b[1:]:
sum=sum+int(a)
print(sum)
...@@ -1950,4 +1953,231 @@ for i in a: ...@@ -1950,4 +1953,231 @@ for i in a:
\ 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