def find_all(s, substr):
    """
        Return a list of indices of non-overlapping occurrences of `substr`
        within `s`.
    """
    indexs = []
    cur_index = -1
    while True:
        cur_index = s.find(substr, cur_index + 1)
        if cur_index == -1:
            break
        indexs.append(cur_index)
    return indexs