Commit 298a4d62 by BellCodeEditor

save project

parent ce6c64e5
Showing with 4 additions and 3 deletions
......@@ -2,7 +2,8 @@ with open(r"c:\Users\EDZ\Desktop\sales_list.txt","r",encoding='utf-8') as f:
a = f.readlines()
for i in a:
b = i.split()
sum = 0
sum = 0
for j in b[1:]:
sum = sum + int(j)
print(b[0] + str(sum))
\ No newline at end of file
res = b[0] + ":" + str(sum) + "元"
print(res)
\ 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