def find_occurrence(string, substring, occurrence):
    """Find position of n'th occurrence of substring in string, else -1."""

    # string - a string to be searched
    # substring - a substring to search for
    # occurrence - the occurrence to search for, starting from 0
    # if not present, return -1

    found = -1
    start_pos = 0
    while (pos := string.find(substring, start_pos)) > -1:
        found += 1
        if found == occurrence:
            break
        start_pos = pos + 1
    return pos