1
我正在尋找一種有效的方法來檢查一個短字符串是否在一個長字符串中。我在這個線程上看到了一些建議: Python efficient way to check if very large string contains a substringPython - find()函數的代價
但是,我沒有看到使用find()那裏。使用find()函數會很昂貴嗎?時間複雜度是多少?
我看過維基頁面,但沒有找到find()。 https://wiki.python.org/moin/TimeComplexity