Commit b94ea2be by BellCodeEditor

save project

parent 6afbf395
Showing with 10 additions and 3 deletions
...@@ -5,6 +5,13 @@ ...@@ -5,6 +5,13 @@
# file.write() # file.write()
with open(r"C:\Users\丽达玛酷8号\Documents\lesson12-1\diy.txt",'c',encoding ='utf-8') as file: with open(r"C:\Users\丽达玛酷8号\Documents\lesson12-1\diy.txt",'c',encoding ='utf-8') as file:
file.write() file.write('小强:9本/n')
file.write('李文')
'''
wint open(r"C:\Users\丽达玛酷8号\Documents\lesson12-1\diy.txt",'r',encoding ='utf-8')
a=file.read()
for data in a:
if "小强:10本" in data:
print("小强在")
print:
print("小强不在")
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