def index_of_in(a, b):
    """
    a = [1, 2, 3, 4]
    b = [2, 4, 5, 6]
    index_of_in(a, b) == [1, 3, -1, -1]
    """
    al = list(a)
    res = [al.index(bitem) if bitem in al else -1 for bitem in b]
    return res