Commit 92804183 by BellCodeEditor

save project

parent a7b10bc2
Showing with 6 additions and 2 deletions
......@@ -2,4 +2,9 @@ with open (r'c:\Users\Charles\Documents\lesson13-1\sales_list.txt','r',encoding=
a=file.readlines()
for i in a:
f=i.split()
print(f[1:])
\ No newline at end of file
#print(f[1:])
sum=0
for l in f[1:]:
sum=sum+int(l)
l=f[0]+str(sum)
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