def find_all(L, x):
    """Find indexes of all occurrences of *x* in list *L*, and return a list of them."""
    out = []
    prev = -1
    while 1:
        try: 
            prev = L.index(x,prev+1)
            out.append(prev)
        except:
            return out