习惯用php了,Python中查找字符串的函数是什么呢?正向查找find,倒找字符串rfind。代码示例:
pos = haystack.find(needle)
pos = haystack.find(needle, offset)
pos = haystack.rf[......]
习惯用php了,Python中查找字符串的函数是什么呢?正向查找find,倒找字符串rfind。代码示例:
pos = haystack.find(needle)
pos = haystack.find(needle, offset)
pos = haystack.rf[......]