I have a very long list of functions and I am hoping to be able to call them and have them print their name and when they are completed as show below.
def call(*functions):
for f in functions:
print(f.__name__)
f()
print('{} completed'.format(f.__name__))
call(lambda: (long(), lst(), of(), func(), ions()...))
I do not want to have to write print(f.__name__) ... print('{} completed'.format(f.__name__)) around every function. However, in the code above it prints 'lambda' (as expected). how can I automate these function calls/print statements so it prints correctly?