單項(xiàng)選擇題

在Python中,如何查找字符串中的子串?()

A.str.index(sub)
B.str.find(sub)
C.str.search(sub)
D.A和B都對(duì)

微信掃碼免費(fèi)搜題