python-判断文件后缀名

>>> str = 'jidlhdpf.jpg'
>>> str.endswith('.jpg')
True

  

endswith