Commit 91897e1c by BellCodeEditor

save project

parent 8ca1dd8b
Showing with 5 additions and 5 deletions
...@@ -7,9 +7,9 @@ for i in a: ...@@ -7,9 +7,9 @@ for i in a:
sum_a=[] sum_a=[]
for e in b[1:]: for e in b[1:]:
sum=sum+int(e) sum=sum+int(e)
f=b[0]+str(sum)+"\n" f=b[0]+str(sum)+"\n"
# sum_a.append(f) sum_a.append(f)
print(f) print(sum_a)
with open(r"c:\Users\EDZ\Desktop\abc.txt","w",encoding="UTF-8") as file: with open(r"c:\Users\EDZ\Desktop\abc.txt","a",encoding="UTF-8") as file1:
file.write(sum_a) file1.writelines(sum_a)
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