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

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

posted @ 2017-05-03 09:15  道高一尺  阅读(1531)  评论(0编辑  收藏  举报