Commit bf782d5c by BellCodeEditor

save project

parent 8e9862ff
Showing with 7 additions and 5 deletions
with open(r"C:\Users\MC3-06\Desktop","w",encoding="utf-8") as tdfgrv:
# for data in file:
# if "小兰:"
tdfgrv.write("小兰:12\n小强:10\n李明:15" )
\ No newline at end of file
with open(r"C:\Users\MC3-06\Desktop\tt.txt","w",encoding="utf-8") as tdfgrv:
for data in file:
if "小兰:12" in data:
print("有")
else:
print(data)
# tdfgrv.write("小兰:12\n小强:10\n李明:15" )
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