Commit 10b33fd1 by BellCodeEditor

auto save

parent 2999a476
Showing with 13 additions and 1 deletions
b=1
while True:
for i in range(100):
for a in range(100):
print(str(b)*i)
for i in range(100):
for a in range(100):
print(str(b)*(101-i))
b=b+1
if b==10:
b=1
\ No newline at end of file
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
# filei.write('张伟:16本\n') # filei.write('张伟:16本\n')
# filei.write('李文:9本\n') # filei.write('李文:9本\n')
# filei.close() # filei.close()
with open(r'C:\Users\Admin\Desktop\text.txt','a',encoding='utf-8') as filei: with open(r'C:\Users\Admin\Desktop\text.txt','r',encoding='utf-8') as filei:
for data in filei: for data in filei:
if '小强:10本' in data: if '小强:10本' in data:
print('小强数据在文件中') print('小强数据在文件中')
......
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