def test(): print "OK" x = [1,test,2] x[1]()