any、all

any(iterable):

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

all(iterable)

原文地址:https://www.cnblogs.com/liujianing/p/13945356.html