如果字符串以指定的后缀结束 endswith()方法返回 true,否则返回False,可选的限制匹配是使用给定的索引开始到结束内。
	
语法
str.endswith(suffix[, start[,end]])
参数
- 
			suffix -- 这可以是一个字符串或者也有可能是元组使用后缀查找 
- 
			start -- 切片从这里开始 
- 
			end -- 切片到此结束 
返回值
		如果字符串以指定的后缀结尾则返回TRUE,否则返回FALSE。
	
	示例
#!/usr/bin/python3 Str='this is string example....wow!!!' suffix='!!' print (Str.endswith(suffix)) print (Str.endswith(suffix,20)) suffix='exam' print (Str.endswith(suffix)) print (Str.endswith(suffix, 0, 19))
结果
True True False True
						上一篇:
								Python3数字
												下一篇:
								Python3字符串
												
						
						
					
					
					