Commit 14898e47 by BellCodeEditor

save project

parent a503f175
Showing with 12 additions and 7 deletions
sb=open(r"C:\Users\燕子红\Desktop\123.txt","w",encoding="utf-8") # sb=open(r"C:\Users\燕子红\Desktop\123.txt","w",encoding="utf-8")
sb.write("小兰:12\n") # sb.write("李文:9本\n")
sb.write("小丽:11\n") # sb.write("张伟:16本\n")
sb.write("李文:9\n") # sb.close()
sb.write("张伟:16\n") # sb=open(r"C:\Users\燕子红\Desktop\123.txt","a",encoding="utf-8")
sb.close() # sb.write("小丽:12本\n")
\ No newline at end of file # sb.close()
with open(r"C:\Users\燕子红\Desktop\123.txt","a",encoding="utf-8") as sb:
sb.write("小兰:12本\n")
sb.write("小强:12本\n")
sb.write("李明:15本\n")
\ 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