Commit e554c214 by BellCodeEditor

save project

parent b4ede5a5
Showing with 9 additions and 0 deletions
...@@ -5,4 +5,6 @@ list1.write("江灏宇:10本\n") ...@@ -5,4 +5,6 @@ list1.write("江灏宇:10本\n")
list1.write("范训豪:14本\n") list1.write("范训豪:14本\n")
list1.write("田宇泽:12本\n") list1.write("田宇泽:12本\n")
list1.write("蔡志鸿:15本") list1.write("蔡志鸿:15本")
with open() as list1:
if'范训豪:14本'
list1.close() list1.close()
\ No newline at end of file
new_data=''
with open(r'C:\Users\EDY\Desktop\Document.txt','r',encoding='utf-8') as list1:
for data in list1:
if'范训豪:14本' 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