我想看看是否存在像test d 100.webp这样的文件,然后查看该文件测试.yaml. 因此,我需要从末尾去掉模式“\u100.webp”。我试图使用下面的代码,它给我的问题。你知道吗
for i, image in enumerate(images_in_item):
if image.endswith("_100.webp"):
image_strip = image.rstrip(_100.webp)
snapshot_markup = os.path.join(image_strip + 'yaml')
Tags:
请执行以下操作:
相关问题 更多 >
编程相关推荐