Commit 47adbec2 by BellCodeEditor

save project

parent bae7ea9b
Showing with 5 additions and 8 deletions
...@@ -7,11 +7,8 @@ ij.write('小张:122本') ...@@ -7,11 +7,8 @@ ij.write('小张:122本')
ij.close() ij.close()
with open(r'C:\Users\29018\Desktop\uxcucya.txt','r',encoding='utf-8')as file: with open(r'C:\Users\29018\Desktop\uxcucya.txt','r',encoding='utf-8')as file:
s=file.read()
print(s)
with open(r'C:\Users\29018\Desktop\uxcucya.txt','r',encoding='utf-8')as file:
for i in file: for i in file:
if "小王" in i if "小王" in i:
print("在")
else: else:
print("不在")
\ No newline at end of file \ 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