I am not sure what you need, but the demo below may be of some help or will further confuse the issue. It assumes that you have a bunch of functions (defs) that you want to call based upon some index number (or other dictionary structure), it doesn't do much but it demos what can be done.
def func1(inputs=None):
x = sum(inputs)
return "sum some numbers: ", x
'''
more functions
'''
def func5(inputs=None):
x_sq = 0
for x in inputs:
x_sq += x**2
return "sum of squares: ", x_sq
'''
more functions
'''
def func8(inputs=None):
return "hello from 8: ", inputs
'''
more functions
'''
a_list = [1,2,3,4,5,6,7,8,9,10]
inputs = "test inputs"
a_dict = {1:[func1([1,2,3]) ],
5:[func5([1,2,3])],
8:[func8("inputs to 8")]}
needed = [1,5,8]
for akey in needed:
if akey in a_list:
action = a_dict[akey]
print "\naction: ", action