Commit 02ea3747 by BellCodeEditor

auto save

parent d9e589ff
Showing with 13 additions and 5 deletions
with open("C:\Users\Administrator\Desktop\test.txt","r",encoding="UTF-8") as file: with open(r"C:\Users\Administrator\Desktop\test.txt","r",encoding="UTF-8") as file:
a=readlines() a=file.readlines()
for i in a: num=[]
print(i) for i in a:
\ No newline at end of file e=0
g=i.split()
for a in g[1:]:
e=e+int(a)
r=g[0]+str(e)
num.append(r)
with open(r"C:\Users\Administrator\Desktop\test.txt","a",encoding="UTF-8") as file:
file.readlines(num)
\ 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