def find_str_occurrences(a_str, a_substr):
    """finds all occurrences of a_substr in a_str and
    returns their indices"""

    result = list()
    index = 0
    while index < len(a_str):
        index = a_str.find(a_substr, index)
        if index == -1:
            break
        result.append(index)
        index += len(a_substr)
    return result