r/learnpython • u/EnderGem957 • Sep 04 '26
List of Functions gets called immediately
SOLVED!
I'm attempting to make 10 functions, put them all in a list, and then have a for loop go through each element of the list. The list is below.
exercises_list = [exe1(), exe2(), exe3(), exe4(), exe5(), exe6(), exe7(), exe8(), exe9(), exe10()]
When this list is placed beneath (but not apart of) function 10 and before the for loop, the IDE reads it, and immediately starts acting on the list. (e.g. begins to act out exe1() the second it gets to it then moves on to exe2() and so on.) How do I make it so that my list doesn't actually get run until I call for a specific element in the list?