Commit c6a8207e by BellCodeEditor

save project

parent 81f52bfc
Showing with 6 additions and 3 deletions
jg=open(r'c:\Users\Administrator\Desktop\sales_list.txt','r',encoding='utf-8')
b=jg.readlines()
for i in b:
sum=0
data=i.split()
print(data[0])
print(data[1:])
\ No newline at end of file
for j in data[1:]:
sum=sum+int(j)
print(sum)
\ 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