Commit ced73ca5 by BellCodeEditor

auto save

parent 5ec53ebb
Showing with 25 additions and 0 deletions
# import random
# a="孙悟空喜欢诺依"
# b="是打发斯蒂芬十大垃圾分类sad间房"
# c=""
# for i in a:
# e=random.choice(b)
# f=random.choice(b)
# g=i+e+f
# c=c+g
# print(c)
a=int(input("输入数:"))
sum=0
for i in range(1,a+1):
with open(r'c:\Users\Administrator\Documents\lesson13-1\sales_list.txt','r',encoding='utf-8') as kk:
a=kk.readlines()
print(a)
for i in a:
b=i.split()
sum=0
for c in b[1:]:
sum=sum+int(c)
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