Commit e0904d47 by BellCodeEditor

save project

parent cd23f353
Showing with 7 additions and 1 deletions
file=open(r"C:\Users\ASUS\Desktop\捐赠明细.txt","w",encoding="utf-8")
file.white("小兰:12本")
file.close()
\ No newline at end of file
with open(r"C:\Users\ASUS\Desktop\捐赠明细.txt","a",encoding="utf-8")as file1:
for data in file1:
if'小强:10本'in data:
if'小来:12本'in data:
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