Commit 38b52a4d by BellCodeEditor

save project

parent 68134cfe
Showing with 7 additions and 0 deletions
...@@ -4,6 +4,12 @@ f.write('小兰:12本') ...@@ -4,6 +4,12 @@ f.write('小兰:12本')
f.write('小丽:11本') f.write('小丽:11本')
f.write('李文:9本') f.write('李文:9本')
f.write('张伟:16本') f.write('张伟:16本')
for data in f:
if '小兰: 10本' in data
print('将小兰的数据在文件中')
if '小丽: 10本' in data
print('将小丽的数据在文件中')
f.close() f.close()
...@@ -25,3 +31,4 @@ f.close() ...@@ -25,3 +31,4 @@ f.close()
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