any、all

any(iterable):

return any(filename.endswith(extension) for extension in [".png", ".jpg", ".jpeg"])

all(iterable)

 

posted @ 2020-10-31 19:35  6+0  阅读(79)  评论(0编辑  收藏  举报