implement strstr return the index of the first occurrence of needle in haystack or 1 if needle is not part of haystack example 1 input haystack hello needle ll output 2 example 2 input haystack aaaaa needle bba output 1 reference https leetcode comproblemsimplementstrstrdescription
def contain_string(haystack, needle):
    if len(needle) == 0:
        return 0
    if len(needle) > len(haystack):
        return -1
    for i in range(len(haystack)):
        if len(haystack) - i < len(needle):
            return -1
        if haystack[i:i+len(needle)] == needle:
            return i
    return -1