Executing a list of functions

HMS Surprise john at datavoiceint.com
Fri Mar 16 22:46:31 CET 2007

Seems to me that one should be able to put the names of several
functions in a list and then have the list executed. But it seems the
output of the functions is hidden, only their return value is visible.
Is this because the list execution is another scope?




def a():
    print "this is a"

def b():
    print "this is b"

lst = [a(), b()]


More information about the Python-list mailing list