添加实践内容(学习通文档捕捉)

This commit is contained in:
965 2023-05-23 23:56:23 +08:00
parent 19e2a4ace4
commit 522c3da7d1
2 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,14 @@
import os
import glob
while True:
data = input()
print("\n")
data = data.rsplit('/', 1)
maxpic = int(str(data[1]).split('.')[0])
suffix = '.png'
for i in range(1, maxpic + 1):
print(data[0] + f"/{i}" + suffix)
print("\n")
path = 'C:/Users/965/Downloads'
for infile in glob.glob(os.path.join(path, '*.png')):
os.remove(infile)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 297 KiB

After

Width:  |  Height:  |  Size: 290 KiB