Commit 8e3f838c by BellCodeEditor

auto save

parent 120afa43
Showing with 9 additions and 9 deletions
...@@ -4,15 +4,15 @@ ...@@ -4,15 +4,15 @@
# file1.write('xiaoli:11ben'/n) # file1.write('xiaoli:11ben'/n)
# file1.close() # file1.close()
# file1= open(r'C:\Users\Administrator\Desktop\test.txt','w',encoding='utf-8') # file1= open(r'C:\Users\Administrator\Desktop\test.txt','w',encoding='utf-8')
# file1.write('小兰:12本'/n) # file1.write('小兰:12本'/n)/
file1= open(r'C:\Users\Administrator\Desktop\test.txt','r',encoding='utf-8') # file1= open(r'C:\Users\Administrator\Desktop\test.txt','r',encoding='utf-8')
a=file1.read() # a=file1.read()
print(a) # print(a)
file1.close() # file1.close()
with open(r'C:\Users\Administrator\Desktop\test.txt','r',encoding='utf-8')as # with open(r'C:\Users\Administrator\Desktop\test.txt','r',encoding='utf-8')as
file1: # file1:
a=file1.read() # a=file1.read()
print(a) # print(a)
with open(r'C:\Users\Administrator\Desktop\test.txt','r',encoding='utf-8')as file1: with open(r'C:\Users\Administrator\Desktop\test.txt','r',encoding='utf-8')as file1:
for data in file1: for data in file1:
......
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