I want to create multiple functions namly func1, func2, ..., funci, in a for loop that all take different definitions. I have tested the following methods but they throw me errors. How is the proper way to do it:
What I want:
for i in range(1, 10):
func1(x, args1):
do something
func2(x, args2):
do something
What I did but didn't work:
for ii in range(1,10):
def globals()["func{}".format(ii)](t, "args{}".format(ii))
for ii in range(1,10):
def "func{}".format(ii)(t, "args{}".format(ii))
For the question I have I found only the following link which does not work for my purpose.
How do I loop through functions with similar names in python?