One-line python answer


  • 0
    M

    Straightforward python one-liner.

    class Solution(object):
        def strStr(self, haystack, needle):
            return haystack.find(needle)
    

Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.