判断字符串的后缀.endswith()

可以用str.endswith('.jpg')来判断字符串是否以jpg结尾,返回True或者False

原文地址:https://www.cnblogs.com/themost/p/6800196.html