[LeetCode] 28. Implement strStr()
Python
class Solution:
def strStr(self, haystack: str, needle: str) -> int:
if len(needle) == 0 :
return 0
else :
return haystack.find(needle)
class Solution:
def strStr(self, haystack: str, needle: str) -> int:
if len(needle) == 0 :
return 0
else :
return haystack.find(needle)
댓글남기기