阅读背景:

python str.find 方法

来源:互联网 

str.find用于寻找字符串中的字串的最近位置。如果没有则返回-1

    def find(self, sub, start=None, end=None): # real signature unknown; restored from __doc__
        """
        S.find(sub[, start[, end]]) -> int
        
        Return the lowest index in S where substring sub is found,
        such that sub is contained within S[start:end].  Optional
        arguments start and end are interpreted as in slice notation.
        
        Return -1 on failure.
        """
        return 0    de



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: