Commit 4183e416 by BellCodeEditor

save project

parent 41098908
Showing with 6 additions and 5 deletions
......@@ -5,18 +5,19 @@ def rea():
print(a)
def look():
with open(r'C:\Users\Administrator\Desktop\text.txt','r',encoding='utf-8') as file:
if '小强:12本' in file:
print("yes")
else:
print("no")
for date in file:
if '小强:12本' in date:
print("yes")
with open(r'C:\Users\Administrator\Desktop\text.txt','a',encoding='utf-8') as file:
while True:
i = input("请输入!")
if i == 'q':
break
else:
if i != 'q' and i != 'r' and i != 'l':
file.write(i + '\n')
if i == 'r':
rea()
if i == "l":
look()
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