Commit c34b5995 by BellCodeEditor

save project

parent d4b8e555
Showing with 16 additions and 10 deletions
# aaa=open(r"C:\Users\周\Desktop\123.txt","w",encoding='UTF-8')
# aaa.write("小兰:12")
# aaa.write("小丽:11")
# aaa.write("李文:9")
# aaa.write("张伟:16")
# aaa.close()
with open (r"C:\Users\周\Desktop\123.txt","a",encoding='UTF-8') as aaa:
aaa.write("小强:12")
aaa.write("李明:15")
\ No newline at end of file
# aaa=open(r"C:\Users\周\Desktop\123.txt","w",encoding='UTF-8')
# aaa.write("小兰:12\n")
# aaa.write("小丽:11\n")
# aaa.write("李文:9\n")
# aaa.write("张伟:16\n")
# aaa.close()
# with open (r"C:\Users\周\Desktop\123.txt","a",encoding='UTF-8') as aaa:
# aaa.write("小强:12\n")
# aaa.write("李明:15\n")
with open(r"C:\Users\周\Desktop\123.txt","r",encoding='UTF-8') as bbb:
for q in bbb:
if "小强:10" and "xiaox" in bbb:
print("在其中")
else:
print("不在")
\ 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