Take this example:
presets = [
"eggs",
"bacon"
]
print(presets[0])
>>> eggs
Why can a not do the same thing, with a list of items to execute? Take this example:
from animations import animation_2, animation_3, animation_4
presets = [
animation_2.iterate(animations_templates_path, thumbnails_final),
animation_3.iterate(animations_templates_path, thumbnails_final),
animation_4.iterate(animations_templates_path, thumbnails_final)
]
When I run this (both WITH and WITHOUT the preset[n]) it executes all three commands in the list. Why is this? I would like to have a list of those presets, and call them via am index number. What am I doing wrong?
animation_2.iterate, then pass the arguments when you take them back out of the list.presets = [animation_2.interate, ...]. Then call by ..............................................presets[0](animations_templates_path, thumbnails_final)[factorial(4), factorial(5)]in a program, would you think the first element of that list is a command you can retrieve and execute later, or would you think it's the factorial of 4? Same with your code.