I am trying to use functional programming to create a dictionary containing a key and a function to execute:
myDict={}
myItems=(\"P1\",\"P2\",\"P3\",....\"
You are wasting your time:
P1
name anyway.Just put all your functions in the .py
file:
# my_module.py
def f1():
pass
def f2():
pass
def f3():
pass
And use them like this:
import my_module
my_module.f1()
my_module.f2()
my_module.f3()
or:
from my_module import f1
from my_module import f2
from my_module import f3
f1()
f2()
f3()
This should be enough for starters.