2018-11-28
阅读量:
702
用一行代码搜索字符串的前后缀
print("http://www.google.com".startswith(("http://", "https://")))
print("http://www.google.co.uk".endswith((".com", ".co.uk")))
#1-> True
#2-> True






评论(0)


暂无数据
推荐帖子
0条评论
0条评论
0条评论