Commit 9070ae73 by BellCodeEditor

save project

parent a3c62f5e
Showing with 19 additions and 2 deletions
with open(r'./sales_list.txt','r',encoding='utf-8') as file:
ab_b=[]
#print(file.read())
#for line in file:
# print(line)
......@@ -20,4 +21,7 @@ for line in a:
for i in date[1:]:
sum += int(i)
print(f'{date[0]}: {sum}')
\ No newline at end of file
b = f'{date[0]}: {sum}\n'
ab_b.append(b)
with open(r'./sales_sum.txt','w',encoding='utf-8') as file:
file.writelines(ab_b)
\ No newline at end of file
悟空: 348
诺依: 380
小贝: 182
李丽: 201
宋扬: 107
王明: 245
李强: 164
孙小白: 222
苏琪: 137
刘若若: 147
刘阳: 226
王胜男: 123
王娇: 131
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