Commit aeda28f3 by BellCodeEditor

save project

parent 91125017
Showing with 4 additions and 0 deletions
...@@ -3,3 +3,6 @@ file.write('小兰是狗 12\n小丽是狗 11\n') ...@@ -3,3 +3,6 @@ file.write('小兰是狗 12\n小丽是狗 11\n')
file.close() file.close()
with open('C:\\Users\\admin\\Desktop\\test.txt','a',encoding='utf-8') as file: with open('C:\\Users\\admin\\Desktop\\test.txt','a',encoding='utf-8') as file:
file.write("悟空最狗 0\n") file.write("悟空最狗 0\n")
with open('C:\\Users\\admin\\Desktop\\test.txt','r',encoding='utf-8') as file:
a=file.read()
print(a)
\ 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