Commit 3d5a6937 by BellCodeEditor

save project

parent 8bc393fd
Showing with 3 additions and 3 deletions
with open(r"c:\Users\Administrator\Documents\lesson13-1\sales_list.txt","r",encoding='utf-8')as file:
a=file.readlines()
#print(a)
list=[]
for j in a:
sum=0
#print(j)
......@@ -8,5 +9,5 @@ for j in a:
#print(y[1:])
for i in y[1:]:
sum+=int(i)
l=y[0]+str(sum)
print(l)
\ No newline at end of file
l=y[0]+str(sum)+'\n'
print(l)
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