Is it possible to concatenate list indices in one statement in Python?
Question: I have a list that looks like

    
    
    alist = [a, b, c, d, e]
    

and I want to pass it to a function that looks like

    
    
    def callme(a, b, e):
        pass
    

So, I would like to do something like

    
    
    callme(*alist[0,1,4])
    

Is there a one liner that will achieve this?

EDIT

I could also do this, I guess (**EDIT** Don't do it this way, drewk has
answered with a better method of enumeration.)

    
    
    callme(*[a for a in alist if alist.index(a) in [0,1,4]])
    


Answer: Use `operator.itemgetter`:

    
    
    from operator import itemgetter
    callme(*itemgetter(0, 1, 4)(alist))
    

