#Python中判断字符串是否以指定后缀结尾endswith()

28.(str).endswith()
判断字符串是否以指定后缀结尾,如果以指定后缀结尾返回True,否则返回False

str50 = "sunck is a good good man"
print(str50.endswith("man"))		
#(输出)True		

猜你喜欢

转载自blog.csdn.net/weixin_43097301/article/details/82954501
今日推荐