Commit 63933aaa by BellCodeEditor

save project

parent f1e6fff9
Showing with 9 additions and 1 deletions
......@@ -2,7 +2,15 @@ with open("c:\\Users\\1111\\Documents\\lesson13-1\\sales_list.txt","r",encoding=
a=f.readlines()
for i in a:
s=i.split()
print(s[1:])
# print(s[1:])
sum=0
for b in s[1:]:
sum=sum+int(b)
sd= s[0]+str(sum)
print(sd)
......
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