Commit 09eb5f7d by BellCodeEditor

save project

parent cd3f72e7
Showing with 7 additions and 6 deletions
with open(r"C:\Users\Administrator\Documents\lesson13-1\sales_list.txt","r",encoding="utf-8")as file:
a=file.readlines()
#print(a)
b=0
for i in a:
e=i.split()
print(e[0])
c=(e[1:])
print(c)
\ No newline at end of file
c=e[1:]
#print(c)
b=0
for j in c:
b=b+int(j)
print(e[0],b)
\ 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