Commit a16d02f7 by BellCodeEditor

auto save

parent 13af521b
Showing with 4 additions and 13 deletions
from tkinter import filedialog
a=filedialog.askopenfilenames(title='选择图片文件',filetypes=[('All Files','*')],initialdir='./')
print(a)
\ No newline at end of file
# 写入同学们的捐赠明细:'小兰:12本'、'小丽:11本'、'李文:9本'、'张伟:16本'
with open(r'C:\Users\Administrator\Desktop\cl.txt','a',encoding='utf-8') as file11:
file11.write('小兰:12本')
file11.write('小丽:11本')
file11.write('李文:9本')
file11.write('张伟:16本')
file11.write('张强:11本')
file11.write('李伟:19本')
with open(r'C:\Users\Administrator\Desktop\cl.txt','r',encoding='utf-8') as file11:
for data in file11
if '张强:11本' 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