Commit 772dc45f by BellCodeEditor

save project

parent e9d3caa3
Showing with 3 additions and 3 deletions
......@@ -6,8 +6,7 @@ with open(r"C:\Users\lenovo\Desktop\text.txt",'w',encoding='utf-8') as a:
a.write("小强:12本")
a.write("李民:15本\n")
with open(r"C:\Users\lenovo\Desktop\text.txt",'r',encoding='utf-8') as a:
s=a.read()
for i in s:
if "小强:12本" in i:
for s in a:
if "小强:12本" in s:
print("666")
\ 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