def all_indexes (text,phrase):

    """Returns a list of all index positions for phrase in text"""
    
    returnlist = []
    starting_from = 0

    while text and phrase in text:
        position = text.index(phrase)
        returnlist.append(starting_from+position)
        text = text[position+len(phrase):]
        starting_from += position+len(phrase)
    return returnlist