IT_World

[leetcode] 28. Implement strStr() 본문

Coding test/programmers - single

[leetcode] 28. Implement strStr()

engine 2022. 3. 24. 18:05
class Solution:
    def strStr(self, haystack: str, needle: str) -> int:
        if len(needle) =="" :
            return 0
        else :
            return haystack.find(needle)
Comments