Commit 88620f4b by BellCodeEditor

save project

parent 929ddf06
Showing with 1 additions and 2 deletions
...@@ -6,8 +6,7 @@ for i in a: ...@@ -6,8 +6,7 @@ for i in a:
sum = 0 sum = 0
for s in data[1:]: for s in data[1:]:
sum += int(s) sum += int(s)
r = data[0] + ":" + str(sum) + "/n" r = data[0] + ":" + str(sum) + "\n"
print(r)
n_s.append(r) n_s.append(r)
with open(r"c:\Users\艾特机器人2号\Documents\lesson13-1\sales_list.txt","w",encoding = "utf-8")as f: with open(r"c:\Users\艾特机器人2号\Documents\lesson13-1\sales_list.txt","w",encoding = "utf-8")as f:
......
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