Commit 0dac3bc9 by BellCodeEditor

save project

parent caf0d401
Showing with 7 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)
s=0
for i in a:
d=i.split()
print(d[0])
print(d[1:])
#print(d[0])
s=0
for j in d[1:]:
s=s+int(j)
print(d[0]+str(s))
\ 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