Commit 0c1b5dd9 by BellCodeEditor

save project

parent 7475d22c
Showing with 11 additions and 4 deletions
......@@ -2,6 +2,13 @@ with open(r'C:\Users\Administrator\Documents\lesson13_2\sales_list.txt','r',enco
a=file.readlines()
# print(a)
for i in a:
print(i)
# b=i.split()
# print(b[1:])
\ No newline at end of file
b=i.split()
# print(b[1:])
sum = 0
for c in b[1:]:
# print(c)
sum +=int(c)
w = b[0]+str(sum)
print(w)
\ 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