# Avoid using built-in functions to solve this challenge. Implement them yourself, since this is what you would be asked to do during a real interview. Implement a function that takes two strings, s and x, as arguments and finds the first occurrence of the string x in s. The function should return an integer indicating the index in s of the first occurrence of x. If there are no occurrences of x in s, return -1.


def strstr(s, x):
    for i in range(len(s)):
        if s[i:i+len(x)] == x:
            return i
    return -1

200aad5dd4d13bc0c47e998a3325c1a9f0de3ef0
<mask token>

def strstr(s, x):
    for i in range(len(s)):
        if s[i:i + len(x)] == x:
            return i
    return -1

# Avoid using built-in functions to solve this challenge. Implement them yourself, since this is what you would be asked to do during a real interview. Implement a function that takes two strings, s and x, as arguments and finds the first occurrence of the string x in s. The function should return an integer indicating the index in s of the first occurrence of x. If there are no occurrences of x in s, return -1.


def strstr(s, x):
    for i in range(len(s)):
        if s[i:i+len(x)] == x:
            return i
    return -1
