def all_indices(s, substr):
    """
    Find all indices in ``s`` where ``substr`` begins.
    Returns results in list.
    """
    indices = []
    i = s.find(substr)
    while i >= 0:
        indices.append(i)
        i = s.find(substr, i+1)
    return indices