I would like to do something like the following:
def add(a, b): #some code def subtract(a, b): #some code operations = [add, subtract] operations[0]( 5,3) operations[1](5,3)
In python, is it possible to assign something like a function pointer?
Did you try it? What you wrote works exactly as written. Functions are first-class objects in Python.