1
我正在寻找一种有效的方法来检查一个短字符串是否在一个长字符串中。我在这个线程上看到了一些建议: Python efficient way to check if very large string contains a substringPython - find()函数的代价
但是,我没有看到使用find()那里。使用find()函数会很昂贵吗?时间复杂度是多少?
我看过维基页面,但没有找到find()。 https://wiki.python.org/moin/TimeComplexity