str.count(sub[,start[,end]])
此方法中,各参数的具体含义如下:
>>> str = "task.lmcjl.com"
>>> str.count('.')
2
>>> str = "task.lmcjl.com"
>>> str.count('.',1)
2
>>> str.count('.',2)
1
>>> str = "task.lmcjl.com"
>>> str.count('.',2,-3)
1
>>> str.count('.',2,-4)
0
本文链接:http://task.lmcjl.com/news/7189.html