python+判断图像后缀

f='1.jpg'

f.endswith('.jpg') or f.endswith('.jpeg') or f.endswith('.png')

  

原文地址:https://www.cnblogs.com/wjjcjj/p/14547266.html