From this list, I want to call a corresponding function, so the first number 1 would call function1, then the 4, function4 etc.
The list of functions will be fixed at seven, so I thought about using tuples to define the list of functions, then call the function from the tuple.
I didn't get very far.
Code: Select all
def action0(): print ('this is action0') def action1(): print ('this is action1') acttup=action0(),action1() print (acttup)
A couple of questions.
Why do I get None, from the print command?
Looking at the bigger picture, is this the best/easiest method for what I want to achieve?